1
mirror of https://github.com/home-assistant/core synced 2024-07-27 18:58:57 +02:00
Commit Graph

541 Commits

Author SHA1 Message Date
J. Nick Koston
5b4d2aed64
Add Powerwalls integration (#32851)
* Create an integration for Powerwalls

* Self review :: remove unused code

* Remove debug

* Update homeassistant/components/powerwall/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* _call_site_info to module level

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/powerwall/test_binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* remove sensors that I added tests for from the comment

* Update homeassistant/components/powerwall/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Switch to UNIT_PERCENTAGE

* reduce code

* Add test for import

* Adjust tests

* Add missing file

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-19 10:50:17 -05:00
AJ Schmidt
40356b4fc5
Enable AlarmDecoder arming without security code (#32390)
* set alarmdecoder code_arm_required to False

* rm unnecessary f strings

* add code_arm_required config option

* add self as codeowner :-)

* add self as codeowner the right way
2020-03-16 14:11:08 +01:00
Steven Looman
b6e69cd370
Add log message on timeout and update less often for upnp devices (#32740)
* Catch asyncio.TimeoutError, show a proper message instead

* Throttle updates to max once per 30s

* Change code owner

* Fix CODEOWNERS + linting

* Warn on connection timeout
2020-03-15 18:18:15 +01:00
J. Nick Koston
7737387efe
Add config flow for rachio (#32757)
* Do not fail when a user has a controller with shared access on their account

* Add config flow for rachio

Also discoverable via homekit

* Update homeassistant/components/rachio/switch.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Split setting the default run time to an options flow

Ensue the run time coming from yaml gets imported into the option flow

Only get the schedule once at setup instead of each zone (was hitting rate limits)

Add the config entry id to the end of the webhook so there is a unique hook per config entry

Breakout the slew of exceptions rachiopy can throw into RachioAPIExceptions

Remove the base url override as an option for the config flow

Switch identifer for device_info to serial number

Add connections to device_info (mac address)

* rename to make pylint happy

* Fix import of custom_url

* claim rachio

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-13 22:46:17 -07:00
Quentame
19be4a5d6d
Refactor Freebox : add config flow + temperature sensor + signal dispatch (#30334)
* Add config flow to Freebox

* Add manufacturer in device_tracker info

* Add device_info to sensor + switch

* Add device_info: connections

* Add config_flow test + update .coveragerc

* Typing

* Add device_type icon

* Remove one error log

* Fix pylint

* Add myself as CODEOWNER

* Handle sync in one place

* Separate the Freebox[Router/Device/Sensor] from __init__.py

* Add link step to config flow

* Make temperature sensors auto-discovered

* Use device activity instead of reachablility for device_tracker

* Store token file in .storage

Depending on host if list of Freebox integration on the future without breaking change

* Remove IP sensors + add Freebox router as a device with attrs : IPs, conection type, uptime, version & serial

* Add sensor should_poll=False

* Test typing

* Handle devices with no name

* None is the default for data

* Fix comment

* Use config_entry.unique_id

* Add async_unload_entry with asyncio

* Add and use bunch of data size and rate related constants (#31781)

* Review

* Remove useless "already_configured" error string

* Review : merge 2 device & 2 sensor classes

* Entities from platforms

* Fix unload + add device after setup + clean loggers

* async_add_entities True

* Review

* Use pathlib + refactor get_api

* device_tracker set + tests with CoroutineMock()

* Removing active & reachable from tracker attrs

* Review

* Fix pipeline

* typing

* typing

* typing

* Raise ConfigEntryNotReady when HttpRequestError at setup

* Review

* Multiple Freebox s

* Review: store sensors in router

* Freebox: a sensor story
2020-03-11 22:15:59 +01:00
Chris Talkington
180bcad477
Add codeowner for roku. (#32695) 2020-03-11 12:52:27 -07:00
Chris Talkington
69b19d54e8
Add codeowner for directv. (#32661) 2020-03-11 07:43:44 +01:00
Paul Madden
61acf944c0
Use bomradarloop v0.1.4 (#32660) 2020-03-11 07:27:07 +01:00
J. Nick Koston
908ae23738
Add griddy integration (#32591)
* Add griddy integration

* Griddy is a wholesale power provider in Texas

* Supports all four load zones in Texas

* Provides real time power price which is useful for automations to handle demand response

* Update homeassistant/components/griddy/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/griddy/config_flow.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Add ability request updated via entity update service.

* Improve error message about already configured

* Remove DEVICE_CLASS_POWER since we do not have a device class for cost

* remove setdefault that was left from previous refactor

* More detail on data naming

* Bump translation for testing

* git add the config flow tests

* s/PlatformNotReady/ConfigEntryNotReady/

* Review items

* git add the other missing file

* Patch griddypower

* reduce

* adjust target

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-10 23:00:30 +01:00
Michaël Arnauts
8c52e2c923
Revert "Breakout tado zone code into a single place (#32564)" (#32639)
This reverts commit c2b03332a0.
2020-03-10 09:32:56 +01:00
J. Nick Koston
c2b03332a0
Breakout tado zone code into a single place (#32564)
* Breakout tado zone code into a single place

* Resolve various incorrect states and add tests for known tado zone states

* Fix home and away presets

* Upgrade to PyTado 0.4.0 which improves http performance and fixes setting fan speed.

* Write state instead of calling for an update

* adjust codeowners

* Add tests for michael's tado and fix heatingPower.value

* Guards are much cleaner

* Adjust per review

* Remove hass passing
2020-03-09 17:44:34 -07:00
lewei50
e1d6964589
Add IamMeter integration (#30465)
* Update .coveragerc

* Update requirements_all.txt

* Create manifest.json

* Add files via upload

* add codeowner

* add codeowner.

* Update sensor.py

* Update sensor.py

* remove unused import.

* Update manifest.json

* Update sensor.py

* modify requirements_all.txt.

* order imports.

* Update sensor.py

* Use DataUpdateCoordinator rewrite code

* set should_poll to False

* remove unused code 'serial'.

* add available prop

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/iammeter/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update sensor.py

* Update sensor.py

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-09 08:39:39 -07:00
Paulus Schoutsen
daff87fe5d
Emoncms API now provides a Unit of Measurement (#32042)
* Emoncms API provides a Unit

The EmonCMS API has been amended to include a 'unit' as part of it's payload.  By using this information, all the sensors can be created without the need for individual sensors to be setup by type.

The change is backward compatible so if a unit type has been specified in the configuration, this will be used by default.

If no unit is pecified either by the Home Assistant configuration, or the Emoncms API, then the default of W will be used as before.

* Update sensor.py

Check the 'unit' key is in the API call. Older systems may not have that key in the payload.

* Modified approach with new configuration item

* Removed new config item

Removed the configuration item. The integration attempts to get the unit from the API.

If this fails *or* the unit key of the API is blank, either the specified unit, or the default will be used.

If approved, documentation will be updated.

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review v2

* Update homeassistant/components/emoncms/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update sensor.py

Update `config_unit`

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-04 18:03:51 -08:00
Paulus Schoutsen
2316f7ace4
Add edl21 component for SML-based smart meters (#27962)
* Add edl21 component for SML-based smart meters

* edl21: Remove unused variable

* [edl21] Add 1 minute throttle to the sensor

* Update homeassistant/components/edl21/manifest.json

Fix documentation URL

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* edl21: Move imports to top

* edl21: Remove special case for STATE_UNKNOWN, which replicated default behavior

* edl21: Implement blacklist for and warn about unhandled OBIS values

* edl21: Make blacklist global

* edl21: Add filter to issues URL

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* edl21: Rename device to entity

* edl21: Don't schedule async_add_entities

* edl21: Use dispatcher, implement own throttling mechanism

* edl21: Simplify keeping track of known obis

* edl21: Use whitelist for state attributes

* edl21: Remove dispatcher on shutdown

* edl21: Convert state attributes to snakecase

* edl21: Annotate handle_telegram with @callback

* edl21: Call async_write_ha_state instead of schedule_update_ha_state

Co-authored-by: David Straub <straub@protonmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-04 17:43:12 -08:00
Matt Snyder
ee7ce47860
Add QVR Pro integration (#31173)
* Initial working commit

* Create const file.  Load camera from component.

* Handle failed authentication.  Bump library version.

* Remove line break

* Camera attributes and recording services

* Add services, manifest, constant update, and exclude_channels.  Prefix channel name.  Update service argument.

* Update codeowners

* Update coveragerc

* Remove codeowners line

* Update codeowners again from python3 -m script.hassfest

* Update homeassistant/components/qvrpro/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Requested changes

* Fix typo

* Update to use exception. Bump library version.

* Support stream component

* Update module header

* Missing property wrapper

* Partial requested changes

* Update coveragerc and codeowners

* Move constants to const file.  Add SHORT_NAME

* Add conf variable

* Use camera domain

* More requested changes

* Requested changes

* Requested changes

* Update prefix

* Handle error condition when camera is not configured to support live streaming

* Move method to camera setup.  Disable stream component support.

* Move auth string to library to prevent private member access

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-03 01:10:02 +01:00
Paulus Schoutsen
1603f7ac21
Add coronavirus integration (#32413)
* Add coronavirus integration

* Update homeassistant/components/coronavirus/manifest.json

Co-Authored-By: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-02 13:40:11 -08:00
guillempages
f53c94ed2a
Add Tankerkoenig integration (#28661)
* Initial version

Parse configuration, but return a fixed value

* Add basic functionality

Request real data from the server
Currently the prices are not getting updated, but the petrol station
data is real

* Update values regularly

The tankerkoenig values get updated regularly with real data.

* Move base functionality for the sensor to a base class

And move that to an own file, so that it can be inherited

* Reduce calls to tankerkoenig api

Use a master/slave concept for sensors; one master gets the data and
updates it into the slaves.

* Update requirements files

* Update all gas stations at once

* Remove tests directory

Currently there are no tests for the integration; will be added in
a future commit.

* Fix slaves not being updated

Let the base class regularly poll, so that slaves are also updated

* Refactor entity creation

Create an auxiliary method to add a station to the entity list,
in preparation to allowing extra stations.

* Add possibility to manually add stations

Add a new configuration option "stations" to manually add extra stations

* Fix style issues

Make the code more pythonic

* Remove redundant code

Implement suggestions from the code review

* Change to platform component

Remove the master/slave concept, in favor of a platform with dummy sensors.
The platform takes care of contacting the server and fetching updates
atomically, and updating the data on the sensors.

* Rename ATTR_STATE

Rename the attribute to "IS_OPEN", to avoid confusion with the sensor state.

* Minor updates

Combine two consecutive error logs into a single one.
Update the sensor's icon

* Separate address into different fields

* Style updates

Use "[]" syntax instead of ".get()" for required parameters
Use warning log level for not available fuel types

* Implement review comments

Fix style issues
Improve error messages
Remove redundant options

* Refactor using DataUpdateCoordinator

Use the new DataUpdateCoordinator to fetch the global data from
the API, instead of implementing an own method.
Also fix comments from the PR

* Implement PR comments

Implement suggestions to improve code readability and keep the Home Assistant style.
Also separate fetching data to an async thread
2020-03-01 16:49:07 +01:00
Tim van Cann
1d962aeb65
Add Avri waste collection sensor (#31134)
* Add Avri waste collection sensor

* Apply black formatting

* Update manifest

* Add requirements

* Add sensor to coverage

* Update import order

* Bump dependency to include todays pickup

* Bump avri version in requirements_all.txt

* Code review comments

* Reduce scan interval to 4 hours

This makes sure that no matter what happens, in
the morning the correct dates have been pulled
without the old ones lingering for too long.

* Better logging

* Made scan interval a timedelta

* Fix import order

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Use filter instead of break statement

* Use positive int for house number extension

* Switch voluptuous types for house number and house number extension

* Update homeassistant/components/avri/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Implement `available`

* Bump avri api

* Code review comments

* Replace `postcode` with `zip_code`

* Update logic for `available`

* Remove variable for delimiter

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-27 22:12:01 -08:00
Pierre
a1a835cf54
Add platform Ezviz (#30378)
* hookid : isort fix

* New platform: Ezviz

* updated CODEOWNERS for ezviz

* proper test requirements

* resolved conflict

* regenerated requirements

* removed stale comments, only one call to add_entities, removed unnecessary attributes

* setup is sync, not async. Removed stale comments

* Compatible with pyezviz 0.1.4

* pyezviz 0.1.4 is now requiredf

* Added PTZ + switch management

* added services.yaml

* proper requirement

* PTZ working in async mode

* Now updates the entity

* Compatible with pyezviz 0.1.5.1

* Fixed switch ir service registering

* now requires pyezviz 0.1.5.2

* now requires pyezviz 0.1.5.2

* Revert "regenerated requirements"

This reverts commit 848b317cf9.

* Rollbacked to a simpler version

* snake_case names everywhere, logging sanatizing, voluptuous proper check

* pyezviz 0.1.5, reworked the PR so that it's intelligible

* no need for services.yaml for now

* proper voluptuous validation

* Removed stale code, use proper conf variable, describe attributes

* regenerated requirements

* stale

* removed status from attributes, since we use it for available we don't need it here then.

* Fixed log message
2020-02-24 10:39:55 +01:00
Robbie Trencheny
f0d58ab7a7
Change TTS codeowner to @pvizeli (#32041) 2020-02-20 13:36:36 -08:00
Franck Nijhof
1c81e8ad68
Remove history_graph integration (#32028)
* Remove history_graph integration

* Update codeowners file
2020-02-20 09:01:29 -08:00
Franck Nijhof
5c5f839119
Remove weblink integration (#32024) 2020-02-20 08:50:40 -08:00
Joseph Albert
fee0d8dbdd
Add rainforest_eagle support for legacy hardware (#28082)
* Add compatibility with Legacy EAGLE models.

* added mdns resultion via zeroconf

* Added requirements to requirements_all.txt

* Fixed model determination bug

* Fixed formatting issue for Eagle-200 responses.

* Remove mDNS resolution, IP now required.

* added pypi deps, fixed handling of optional params

manifest updates

* Fixed import order per isort.

* Two pylint fixes.

* More consistent try-fail structure to guessing hardware.  Errors actually fail.
2020-02-15 21:10:04 -08:00
Emanuel Winblad
3e05fc1c11
Add initial version of Vilfo Router integration (#31177)
* Initial implementation of Vilfo router integration.

This commit is a combination of several commits, with commit messages in bullet form below.

* Added additional files to Vilfo integration.
* Added generated files.
* Fixed alphabetic order in generated config_flows.
* Continued implementation of config flow for Vilfo integration.
* Continued work on config_flow for Vilfo.
* Updated requirements in manifest for Vilfo Router integration.
* Some strings added to Vilfo Router integration.
* Vilfo Router integration updated with sensor support.
* Code style cleanup.
* Additional cleanup of config flow.
* Added additional UI strings for Vilfo Router
* Updated tests of config flow and fixed formatting
* Updated requirement upon vilfo-api-client.
* Sensor refactoring including support for icons
* Code style changes for Vilfo Router integration
* Code cleanup
* Fixed linting issues in Vilfo Router integration
* Fixed import order in test for Vilfo integration.

* Updates to Vilfo Router integration based on feedback

Based on the feedback received, updates have been made to the Vilfo Router integration.

A couple of the points mentioned have not been addressed yet, since the appropriate action has not yet been determined. These are:

* https://github.com/home-assistant/home-assistant/pull/31177#discussion_r371124477
* https://github.com/home-assistant/home-assistant/pull/31177#discussion_r371202896

This commit consists of:

    * Removed unused folder/submodule
    * Fixes to __init__
    * Fixes to config_flow
    * Fixes to const
    * Refactored sensors and applied fixes
    * Fix issue with wrong exception type in config flow
    * Updated tests for Vilfo integration config_flow
    * Updated dependency upon vilfo-api-client to improve testability
    * Import order fixes in test
    * Use constants instead of strings in tests

* Updated the VilfoRouterData class to only use the hostname as unique_id when it is the default one (admin.vilfo.com).

* Refactored based on feedback during review.

* Changes to constant names,
* Blocking IO separated to executor job,
* Data for uptime sensor changed from being computed to being a timestamp,
* Started refactoring uptime sensor in terms of naming and unit.
* Updated constants for boot time (previously uptime) sensor.
* Refactored test of Vilfo config flow to avoid patching code under test.
* UI naming fixes and better exception handling.

* Removed unused exception class.

* Various changes to Vilfo Router integration.

* Removed unit of measurement for boot time sensor,
* Added support for a sensor not having a unit,
* Updated the config_flow to handle when the integration is already configured,
* Updated tests to avoid mocking the code under test and also to cover the aforementioned changes.

* Exception handling in Vilfo Router config flow refactored to be more readable.

* Refactored constant usage, fixed sensor availability and fix API client library doing I/O in async context.

* Updated signature with hass first

* Update call to constructor with changed order of arguments
2020-02-12 19:11:15 +01:00
J. Nick Koston
f5be9ef7fb
Refresh the august access token when needed (#31735)
* Refresh the august access token
when needed.

Currently august will stop working when the token
expires about every six month.

This resolves issue #23788

* Make refresh_access_token_if_needed private since we do not want additional callers

* Add init
2020-02-11 22:13:54 -08:00
Kit Klein
3435281bd1
Support Konnected Pro alarm panel, embrace async, leverage latest HA features/architecture (#30894)
* fix unique_id computation for switches

* update konnected component to use async, config entries, registries. Pro board support and tests

* clean up formatting comments from PR

* use standard interfaces in tests

* migrate config flow to use options

* address latest pr feedback

* format for import as part of config schema validation

* address pr feedback

* lint fix

* simplify check based on pr feedback

* clarify default schema validation

* fix other schema checks

* fix translations

Co-authored-by: Nate Clark <nate@nateclark.com>
2020-02-11 22:04:42 +01:00
Ziv
4467409e5c
Dynalite Integration (#27841)
* Initial commit

* ran hassfest and gen_requirements_all scripts

* fixes per request from Paulus Schoutsen

* ran gen_requirements_all

* updated library version - removed some debug leftover

* get_requirements again...

* added documentation URL

* ran isort

* changed storage in hass.data[DOMAIN] to use entry_id instead of host

* adopted unit tests to latest fix

* Update const.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-10 13:16:04 -08:00
Vilppu Vuorinen
b78d156f0e
Add MELCloud integration (#30712)
* Add MELCloud integration

* Provides a climate and sensor platforms. Multiple platforms on one go
is not the best option, but it does not make sense to remove them and
commit them later either.

* Email and access token are stored to the ConfigEntry. The token can be
updated by adding the integration again with the same email address. The
config flow is aborted and the update is performed on the background.

* Run isort

* Fix pylint errors

* Run black

* Increase coverage

* Update pymelcloud dependency

* Add HVAC_MODE_OFF emulation

* Remove print

* Update pymelcloud to enable device type filtering

* Collapse except blocks and chain ClientNotReadys

* Add preliminary documentation URL

* Use list comp for creating model info

Filters out empty model names form units.

* f-string galore

Dropped 'HVAC' from AtaDevice name template.

* Delegate fan mode mapping to pymelcloud

* Fix type annotation

* Access AtaDevice through self._device

* Prefer list comprehension

* Update pymelcloud to leverage device type grouping

The updated backend lib returns devices in a dict grouped by the device
type. The devices do not necessarily need to be in a single list and
this way isinstance is not required to extract devices by type.

* Remove DOMAIN presence check

This does not seem to make much sense after all.

* Fix async_setup_entry

Entry setup used half-baked naming from few experimentations back.
The naming conventiens were unified to match the platforms.

A redundant noneness check was also removed after evaluating the
possible return values from the backend lib.

* Simplify empty model name check

* Improve config validation

* Use config_validation strings.

* Add CONF_EMAIL to config schema. The value is not strictly required
when configuring through configuration.yaml, but having it there makes
things more consistent.

* Use dict[key] to access required properties.

* Add DOMAIN in config check back to async_setup. This is required if an
integration is configured throught config_flow.

* Remove unused manifest properties

* Remove redundant ClimateDevice property override

* Add __init__.py to coverage exclusion

* Use CONF_USERNAME instead of CONF_EMAIL

* Use asyncio.gather instead of asyncio.wait

* Misc fixes

* any -> Any

* Better names for dict iterations

* Proper dict access with mandatory/known keys

* Remove unused 'name' argument

* Remove unnecessary platform info from unique_ids

* Remove redundant methods from climate platform

* Remove redundant default value from dict get

* Update ConfigFlow sub-classing

* Define sensors in a dict instead of a list

* Use _abort_if_unique_id_configured to update token

* Fix them tests

* Remove current state guards

* Fix that gather call

* Implement sensor definitions without str manipulation

* Use relative intra-package imports

* Update homeassistant/components/melcloud/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-10 22:09:12 +01:00
elmurato
699d6ad658
Add Minecraft Server Integration (#30992)
* Add Minecraft Server integration

* Add unit test for config flow

* Fixed some review findings and increased unit test coverage

* Fixed docstrings of new test cases

* Removed unnecessary debug log messages

* Added unique IDs and device infos and removed duplicate name validation

* Attempt to fix unit test on CI

* Return state OFF instead of UNAVAILABLE in case connection to server drops

* Added property decorator to server properties, even less debug messages, improved sensor dispatcher connection and other review findings fixed

* Moved special property handling to sensors, fixed name confusion in sensor entity, switch to HA const for scan_interval, simplified building players list string

* Improved periodic update, speeded up unit tests

* Added type hints, added callback decorator to entity update callback, added const.py to unit test exclusions

* Changed state sensor to binary sensor, removed empty unit test file, added constants for icons and units

* Let HA handle unknown state, check for None in description and players list sensor

* Removed periods at end of log messages, removed constant for default host

* Updated requirements_test_pre_commit.txt, fixed codespell findings

* Use localhost as default host

* Removed passing hass to entities, moved log message from init, moved host lower to vol, use proper patch library, patch library instead of own code

* Replaced server properties with global instance attributes, removed config option scan_interval, switch back to async_track_time_interval

* Removed description and players list sensors, added players list as state attributes to online players sensor, raise OSError instead of deprecated IOError, other minor review findings fixed

* Use MAC address for unique_id in case of an IP address as host, added getmac to manifest.json, added invalid_ip to strings.json, added new test cases for changes in config_flow, replace all IOError's with OSError, other review findings fixed

* Removed double assignment

* Call get_mac_address async safe

* Handle unavailable and unknown states to reach silver quality scale, added quality scale to manifest.json
2020-02-08 09:28:35 +01:00
Franck Nijhof
1cfd69d484
Remove of liveboxplaytv integration (ADR0004) (#31525) 2020-02-06 12:54:46 +01:00
Malte Franken
8d429d7676
Add GDACS feed integration (#31235)
* initial version of gdacs integration

* updated translations

* generated files

* added abbreviation

* bumped library version

* small feed entry attribute fixes

* add unit tests

* need to use original mdi name

* bumped library version

* improved entity name for earthquakes

* round vulnerability number

* typo

* support for categories

* testing support for categories

* tie longitude and latitude together

* validating categories

* simplifying setup

* passing domain as parameter

* simplified test setup

* moved test code

* simplified test code

* removed superfluous code

* changed approach to unique identifier

* changed code structure

* simplified unit system handling

* made schema a constant

* comment added

* simplifying code

* added message if location already configured

* removed unnecessary code

* simplified test code

* avoid mocking __init__

* pylint

* simplified code

* fetch categories from integration library

* setting PARALLEL_UPDATES

* setting PARALLEL_UPDATES to zero/unlimited

* added quality scale
2020-02-06 11:32:30 +01:00
Quentame
201ea2557e
Add config flow to Meteo-France (#29927)
* Add config flow to Meteo-France

* Review 1

* Use config_entry.unique_id

* Fix config_flow _show_setup_form + init

* Remove empty *_setup_platform()

* Avoid HomeAssistantError: Entity id already exists: sensor.[city_name]_[sensor_type]. Platform meteo_france does not generate unique IDs

- when multiple district in one city

* Review + abort when API error

* Fix I/O

* Remove monitored_conditions

* Add async_unload_entry

* Review 3

* Fix pipe

* alert_watcher is already None

* Review 4

* Better fix for "Entity id already exists"

* Whoops, fix tests

* Fix string
2020-02-04 22:37:59 +01:00
Björn Orri
8852cd0def
Add Salt Fiber Box device tracker (#30986)
* Add salt component

* Update files from development checklist

* Use warning log level when data cannot be retrieved

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Remove empty fields from manifest.json

* Remove default arguments for host and username

* Bump saltbox library version

* Refactor and improve error handling

* Dev checklist

* Fix linting errors

* Check for None and return empty list

* Log on debug level instead of info

* More compact None checks

* Remove redundant None check

* Return None on exception but store as empty list

* More compact syntax

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-02 17:26:51 +01:00
Austin Mroczek
f584df46b7
Add totalconnect zones as binary sensors (#28712)
* Bump skybellpy to 0.4.0

* Bump skybellpy to 0.4.0 in requirements_all.txt

* Added extra states for STATE_ALARM_TRIGGERED to allow users to know if
it is a burglar or fire or carbon monoxide so automations can take
appropriate actions.  Updated TotalConnect component to handle these new
states.

* Fix const import

* Fix const import

* Fix const imports

* Bump total-connect-client to 0.26.

* Catch details of alarm trigger in state attributes.

Also bumps total_connect_client to 0.27.

* Change state_attributes() to device_state_attributes()

* Move totalconnect component toward being a multi-platform integration.  Bump total_connect_client to 0.28.

* add missing total-connect alarm state mappings

* Made recommended changes of MartinHjelmare at
https://github.com/home-assistant/home-assistant/pull/24427

* Update __init__.py

* Updates per MartinHjelmare comments

* flake8/pydocstyle fixes

* removed . at end of log message

* added blank line between logging and voluptuous

* more fixes

* Adding totalconnect zones as HA binary_sensors

* fix manifest.json

* flake8/pydocstyle fixes.  Added codeowner.

* Update formatting per @springstan guidance.

* Fixed pylint

* Add zone ID to log message for easier troubleshooting

* Account for bypassed zones in update()

* More status handling fixes.

* Fixed flake8 error

* Another attempt at black/isort fixes.

* Bump total-connect-client to 0.50.  Simplify code using new functions in
total-connect-client package instead of importing constants.  Run black
and isort.

* Fix manifest file

* Another manifest fix

* one more manifest fix

* more manifest changes.

* sync up

* fix indent

* one more pylint fix

* Hopefully the last pylint fix

* make variable names understandable

* create and fill dict in one step

* Fix name and attributes

* rename to logical variable in alarm_control_panel

* Remove location_name from alarm_control_panel attributes since it is
already the name of the alarm.

* Multiple fixes to improve code per @springstan suggestions

* Update homeassistant/components/totalconnect/binary_sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Multiple changes per @MartinHjelmare review

* simplify alarm adding

* Fix binary_sensor.py is_on

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-02-01 10:09:52 +01:00
Rami Mosleh
9432054066
Rework Mikrotik device scanning following Unifi (#27484)
* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* update librouteros to 3.0.0

* fix sorting

* fix sorting 2

* revert to 2.3.0 as 3.0.0 requires code update

* fix requirements

* apply fixes

* fix tests

* update hub.py and fix tests

* fix test_hub_setup_failed

* rebased on dev and update librouteros to 3.0.0

* fixed test_config_flow

* fixed tests

* fix test_config_flow
2020-01-30 10:21:51 -08:00
Phil Bruckner
61e41f0ddc
Add code owner for amcrest integration (#31276) 2020-01-29 11:50:18 -06:00
Matthew Treinish
85dbf1ffad
Add OPNSense device tracker (#26834)
* Add OPNSense device_tracker

This commit adds a new component for using an OPNSense router as a
device tracker. It uses pyopnsense to query the api to look at the
arptable for a list of devices on the network.

* Run black formatting locally to appease azure

* Apply suggestions from code review

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Fix issues identified during code review

This commit updates several issues found in the module during code
review.

* Update homeassistant/components/opnsense/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update CODEOWNERS for recent changes

* Fix lint

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* More fixes from review comments

This commit fixes several issues from review comments, including
abandoning all the use of async code. This also completely reworks the
tests to be a bit clearer.

* Revert tests to previous format

* Add device detection to opnsense device_tracker test

This commit adds actual device detection to the unit test for the setup
test. A fake api response is added to mocks for both api clients so that
they will register devices as expected and asserts are added for that.

The pyopnsense import is moved from the module level to be runtime in
the class. This was done because it was the only way to make the
MockDependency() call work as expected.

* Rerun black

* Fix lint

* Move import back to module level

* Return false on configuration errors in setup

This commit updates the connection logic to return false if we're unable
to connect to the configured OPNsense API endpoint for any reason.
Previously we would not catch if an endpoint was incorrectly configured
until we first tried to use it. In this case it would raise an unhandled
exception. To handle this more gracefully this adds an api call early in
the setup and catches any exception raised by that so we can return
False to indicate the setup failed.

* Update tests

* Add pyopnsense to test requirements

* Rerun gen_requirements script

* Fix failing isort lint job step

Since opening the PR originally yet another lint/style checker was added
which failed the PR in CI. This commit makes the adjustments to have
this pass the additional tool's checks.

* Fix comment

* Update manifest.json

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-29 16:20:43 +01:00
brefra
03954be12d Add brefra to codeowners list Velbus integration (#31245)
* Add myself to codeowners list

* Add myself to CODEOWNERS file
2020-01-28 09:25:15 -05:00
Oscar Calvo
d813618d0d Add Gammu based local SMS notifications (#31233)
* Add sms integration

Committer: ocalvo <oscar@calvonet.com>

* Fix PyLint

* Update requirements
2020-01-28 09:35:41 +01:00
Ron Klinkien
4e2737bfb7 Add Garmin Connect integration (#30792)
* Added code files

* Correctly name init file

* Update codeowners

* Update requirements

* Added code files

* Correctly name init file

* Update codeowners

* Update requirements

* Black changes, added to coveragerc

* Removed documentation location for now

* Added documentation url

* Fixed merge

* Fixed flake8 syntax

* Fixed isort

* Removed false check and double throttle, applied time format change

* Renamed email to username, used dict, deleted unused type, changed attr name

* Async and ConfigFlow code

* Fixes

* Added device_class and misc fixes

* isort and pylint fixes

* Removed from test requirements

* Fixed isort checkblack

* Removed host field

* Fixed coveragerc

* Start working test file

* Added more config_flow tests

* Enable only most used sensors by default

* Added more default enabled sensors, fixed tests

* Fixed isort

* Test config_flow  improvements

* Remove unused import

* Removed redundant patch calls

* Fixed mock return value

* Updated to garmin_connect 0.1.8 fixed exceptions

* Quick fix test patch to see if rest is error free

* Fixed mock routine

* Code improvements from PR feedback

* Fix entity indentifier

* Reverted device identifier

* Fixed abort message

* Test fix

* Fixed unique_id MockConfigEntry
2020-01-27 09:12:18 -08:00
Maikel Punie
3f03848a07 Fix Velbus covers (includes velbus lib upgrade) (#31153)
* Fix velbus covers

* Update python-velbus lib

* flake8 and black fixes

* Fix comments

* fix codeowner
2020-01-26 14:36:29 +01:00
Matt Snyder
e4832ee4d0 Remove Owlet component (#31160)
* Remove owlet component

* Remove owlet from requirements_all.txt
2020-01-25 21:08:36 +01:00
Franck Nijhof
7e4b9adc3d
Rewrite of Spotify integration (#30717)
* Rewrite of Spotify integration

* Update homeassistant/components/spotify/config_flow.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Remove configurator dependency

* Strip whitespace from device model in case Spotify product is missing

* Ensure domain dict exists in hass data on setup entry

* Simply config validation for client id and secret

* Abort flow on any exception from spotipy

* Add tests for config flow

* Gen requirements all

* Add test package __init__

* Remove Spotify from coveragerc

* Made alias handling more robuust

* Fix supported_features for Spotify free and open accounts

* Improve error message in the logs

* Re-implement Spotify media_player

* Change media content type when play a playlist

* Process review suggestions

* Move Spotify init, static current user and supported_features

* Remove unneeded me call

* Remove playlist content type due to frontend issues

* Improve playlist handling, when context is missing

* Handle entity disabled correctly

* Handle being offline/unavailable correctly

* Bump Spotipy to 2.7.1

* Update coverage RC, mark integration silver

* Remove URI limitation, lib supports all Spotify URI's now

* Final cleanup

* Addresses Pylint error

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-24 18:47:22 +01:00
Robin
c71ae090fc Add sighthound integration (#28824)
* Add component files

* Add test state

* Adds person detected event

* Update CODEOWNERS

* Updates requirements

* remove unused datetime

* Bump sighthound version

* Update CODEOWNERS

* Update CODEOWNERS

* Create requirements_test_all.txt

* Address reviewer comments

* Add test for bad_api_key
2020-01-23 09:30:06 +01:00
Jonathan Keljo
572b81e7e0 Add myself to owners for components I contributed (#31020)
* Add myself to owners for components I contributed

* Update CODEOWNERS
2020-01-22 17:49:00 -08:00
Abílio Costa
2aff913d9b Update pyipma to 2.0 (#30746)
* update ipma component for pyipma 2.0

* fix wind speed; refactor forecast

* update requirements*.txt

* fix tests; update CODEOWNERS; update pyipma to 2.0.1

* minor changes as suggested in PR

* make lint happy

* fix mocking coroutines

* restore old unique id

* fix station lat/lon; update pyipma version
2020-01-21 17:04:22 +01:00
Faucogney Anthony
b2212ad445 Add Derivative component (#26456)
* create derivation component

based on integration component
remove left and right

* Update test

(was'n saved)

* add some functionnal point test

* Change derivation to derivative

* Continue migration from derivation to derivative

* Add codeowners info

* fix tests typo and values

* Improve code from reviewer

add test case
fix test values
still a prefix issue that should not

* create derivation component

based on integration component
remove left and right

* Update test

(was'n saved)

* add some functionnal point test

* Change derivation to derivative

* Continue migration from derivation to derivative

* Add codeowners info

* fix tests typo and values

* Improve code from reviewer

add test case
fix test values
still a prefix issue that should not

* Update homeassistant/components/derivative/sensor.py

Fix test issue with unit of measurement

Co-Authored-By: Santobert <tobhaase@gmail.com>

* Fix review

Move ValueError to SyntaxError

* precise state test

* un comment original tests and remove error tests

* Fix isort issue

* Fix review

- update doc link
- migrate to general const import

* Rollback import conf_unit, just defined localy

Co-authored-by: Santobert <tobhaase@gmail.com>
2020-01-19 22:17:06 -08:00
Miroslav Ždrale
36796ef649 Update pyubee to 0.8 (#30785) 2020-01-15 16:24:06 +01:00
Paulus Schoutsen
5fdc60e067
Add Safe Mode (#30723)
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Paulus Schoutsen
c4673ddee1
Update Ring to 0.6.0 (#30748)
* Update Ring to 0.6.0

* Update sensor tests

* update -> async_update

* Delete temp files

* Address comments

* Final tweaks

* Remove stale print
2020-01-14 12:54:45 -08:00
Franck Nijhof
658d338058 Removes Cisco Spark integration (#30738) 2020-01-13 10:23:26 -08:00
Yarmo Mackenbach
96bf8bc395 Update NSAPI to version 3.0.0 (#30599)
* Updated NSAPI to version 3.0.0

* Fixed code style error

* Restructured API access

* Improved construction of attributes

* Fixed handling of API output

* Added @YarmoM as code owner

* Updated CODEOWNERS

* Reverted changes for full backwards compatibility

* Fixed bad conditional

* Simplify conditional
2020-01-12 20:30:26 +01:00
cgtobi
e793ed9ab0 Refactor Netatmo integration (#29851)
* Refactor to use ids in data class

* Use station_id

* Refactor Netatmo to use oauth

* Remove old code

* Clean up

* Clean up

* Clean up

* Refactor binary sensor

* Add initial light implementation

* Add discovery

* Add set schedule service back in

* Add discovery via homekit

* More work on the light

* Fix set schedule service

* Clean up

* Remove unnecessary code

* Add support for multiple entities/accounts

* Fix MANUFACTURER typo

* Remove multiline inline if statement

* Only add tags when camera type is welcome

* Remove on/off as it's currently broken

* Fix camera turn_on/off

* Fix debug message

* Refactor some camera code

* Refactor camera methods

* Remove old code

* Rename method

* Update persons regularly

* Remove unused code

* Refactor method

* Fix isort

* Add english strings

* Catch NoDevice exception

* Fix unique id and only add sensors for tags if present

* Address comments

* Remove ToDo comment

* Add set_light_auto back in

* Add debug info

* Fix multiple camera issue

* Move camera light service to camera

* Only allow camera entities

* Make test pass

* Upgrade pyatmo module to 3.2.0

* Update requirements

* Remove list comprehension

* Remove guideline violating code

* Remove stale code

* Rename devices to entities

* Remove light platform

* Remove commented code

* Exclude files from coverage

* Remove unused code

* Fix unique id

* Address comments

* Fix comments

* Exclude sensor as well

* Add another test

* Use core interfaces
2020-01-11 12:20:00 +01:00
etheralm
5ffbf55170 Add support for Dyson TP06 fan (#30611)
* initial commit

* update manifest.json

* update CODEOWNERS

* remove unnecessary else

* add rest of asserts for TP06 state test
2020-01-11 10:41:52 +01:00
NobleKangaroo
e2f591e5bc Remove self as Emulated Hue codeowner (#30654) 2020-01-10 22:35:18 +01:00
Paulus Schoutsen
3348f4f6d1
Add search integration (#30511)
* Add search integration

* Add scenes and config entry support

* Update comments

* Add support for groups

* Allow querying config entry

* Update manifest

* Fix scene tests
2020-01-10 19:57:37 +01:00
fwestenberg
498bec4a61 Add Stookalert integration (#30306)
* Added Stookalert integration

* Added Stookalert integration

* Added Stookalert integration

* Solved comments

* Flake8 change

* Bump stookalert to version 1.1.2

* Fixed attributes and state

* Get method for private variables

*  Update to stookalert 0.1.4

* Code optimization

* Update requirements
2020-01-08 21:03:50 +01:00
tetienne
13e6479b6e Ease code before adding color and temperature to light template (#30455)
* Split async_update

* Use pytest parameters to avoid duplicate code

* Fix UnboundLocalError

* Test error rendering for template state

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-07 17:22:42 +01:00
Aleix Murtra
1d1aa06d05 Add TMB sensor (#27964)
* Add TMB i-Bus sensor

* Raise exception if HTTP error

* Addressed comments

* Fixed format

* Fixed format

* Addressed comments

* Remove guard before add_entities method

* Remove unauthorized exception

* Make CONF_BUS_STOPS option required
2020-01-07 16:22:16 +01:00
Trekky12
5ed1f16f25 Add pilight dimmer as light component (#30107)
* Add pilight dimmer as light component

* fix CI errors

* fix missing new lines

* improve formatting and addresses comments of @springstan

* rename config parameter and remove super() call to match pylint

* import only used constants of the pilight component

* Add myself to the code owners

* fix CODEOWNERS
2020-01-06 20:13:08 -05:00
Maciej Bieniek
21029b1d7b Add Brother Printer integration (#30359)
* Init entities as unavailable when offline

* Initial commit

* Fix CODEOWNERS

* CODEOWNERS

* Run script.hassfest

* Add initial test

* Bump library

* More tests

* Tests

* Add new sensors and fix KeyError

* Fix unique_id and device_info

* Fix check for configured device

* More tests

* Bump library version

* Add uptime sensor

* Use config entry unique ID

* Run python3 -m script.gen_requirements_all

* Fix pylint error

* Remove pysnmp dependency

* Raise ConfigEntryNotReady when device offline at HA start

* Remove period from logging message

* Generator simplification

* Change raise_on_progress

* Rename data to printer

* Move update state to async_update

* Remove unused _unit_of_measurement

* Remove update of device_info

* Suggested change for tests

* Remove unnecessary argument

* Suggested change
2020-01-06 11:06:16 -06:00
Ben
1fffa210e1 Add surepetcare component (#24426)
* add surepetcare

* cleanup

* remove unused imports and comments

* remove comment

* fix bug which prevented updating the sensors

* improve config validation

* fix voluptuous usage

* fix format & credential storage

* various fixes to hass-conform

* small format fixes

* change False to None

* still trying to be hass-conform

* remove unused class

* fix imports

* fix f-string

* add guard clause?!

* central data fetch

* do not pass in hass, will be provided automatically

* make the linters happy

* disable constant-test warning and add commas

* worksforme

* fix link in manifest

* remove icon

* bump surepy to 0.1.5

* worksforme

* small doc fixes

* add discovery_info guard

* result of another awesome review

* and again :)

* exclude surepetcare in .coveragerc
2020-01-06 09:00:01 -05:00
David Cramer
3033dbd86c Add Sentry component (#30422) 2020-01-03 21:34:20 +01:00
Bas Nijholt
0d5486f772 Add KEF speakers integration (#28959)
* add KEF speakers platform for the integration

This will work with the KEF LS50 Wireless and KEF LSX speakers.
The development of this code happened on https://github.com/basnijholt/media_player.kef

* rename DATA_KEF -> DOMAIN

* use aiokef v0.2.0 and support LSX and new features

* sort imports

* fix @MartinHjelmare's suggestions

* remove _CONFIGURING

* change STATE_UNKNOWN to None

* use lat and long for unique_id

* bump aiokef to v0.2.2

* use config[ATTR] instead of config.get(ATTR)

* use getmac

* fix case when MAC is None

* use host as instance lifetime id

* fix requirements
2020-01-03 14:59:44 +01:00
Josh Bendavid
c1936f6fe4 Add generic command/button functionality to webostv (#30379)
* add generic command/button functionality to webostv

* update codeowners
2020-01-02 22:32:56 +01:00
Issac
3f570245aa Add local_ip component (#29973)
* Added localip component

* Split config and core logic, and migrate to sensor platform (requested by @MartinHjelmare)
Also allow overriding the sensor name via the config

* Tweak docstring

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Initial support for config entries

* Rename localip to local_ip (1/2)

* Rename localip to local_ip (2/2)

* Add test for config_flow

* Split and rename tests

* Remove unneeded code from config_flow

* Implement configuration as config entry import.  Other misc requested changes from code review.

* Fix tests

* minor code review fixes

* remove unneeded code

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-12-31 14:34:53 +01:00
Maciej Bieniek
2c1a7a54cd Add GIOS integration (#28719)
* Initial commit

* Add gios to requirements

* Add tests

* Update .coveragerc file

* Run gen_requirements_all.py

* Change DEFAULT_SCAN_INTERVAL

* Better strings

* Bump library version

* run script.hassfest

* run isort

* Add icons mapping

* Remove unnecessary f-string

* Remove unnecessary listener

* Refactoring config_flow

* Add unique_id to config entry

* Change AQI states to consts in English

* Remove unused init

* Remove unused exception

* Remove private instance attribute

* Remove overwrite state property

* Fix pylint error

* Add SCAN_INTERVAL for air_quality entity

* Add _abort_if_unique_id_configured()
2019-12-31 13:05:31 +01:00
Fabian Affolter
d0c9a42b81
Add custom validator for countries (#30280) 2019-12-30 17:51:25 +01:00
Tim Rightnour
f32eaa2fdd Add onewire devices and owserver remote host support (#29948)
* Add support for HobbyBoards sensors: Hub, Humidity, Moisture, PulseCounter
Add support for an owserver running on a remote host

* Cleanup and fixes for style/etc

* Forgot to convert to f-strings.

* Update with changes requested by @MartinHjelmare

* Pylint

* Fix to None

* Reverse logic for hobbyboard test to eliminate pylint complaint

* Modified manifest to list myself as codeowner

* Move some functions down into OneWireProxy instead of the top OneWire

* Oops, missed some decode()'s

* And another!
2019-12-24 14:41:29 +01:00
Alan Tse
3aa2ae1700 Enable config flow for Tesla (#28744)
* build: bump teslajsonpy to 0.2.0

* Remove tests

* feat: add config flow

* feat: add async

* perf: convert unnecessary async calls to sync

* feat: add charger voltage and current sensor

* feat: add options flow

* build: bump teslajsonpy to 0.2.0

* Remove icon property

* Revert climate mode change

* Remove charger sensor

* Simplify async_setup_platform

* Update homeassistant/components/tesla/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/tesla/binary_sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Address requested changes

* Fix pylint error

* Address requested changes

* Update codeowners

* Fix pylint error

* Address requested changes

* Address requested change

* Remove unnecessary check for existing config entry

* Load scan_interval in async_setup_entry

* Include coverage of config_flow

* Add tests for full coverage

* Address requested test changes

* Remove unnecessary init lines

* Remove unnecessary init

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 21:54:25 +01:00
Paulus Schoutsen
b9eb831d29
Revert Tahoma removal (#29840)
* Revert "Remove Tahoma component #29744 (#29745)"

This reverts commit df74272ba6.

* Revert "Cleanup removed component (#29788)"

This reverts commit 3a28361beb.
2019-12-12 06:37:55 +01:00
Quentame
c804f8f961 Add config flow to iCloud (#28968)
* iCloud: setup ConfigFlow and prepare for more platforms

- add config flow + tests
- fix existing services
- add play_sound & display_message services
- document services
- can use devices with the same name
- prepare to add sensor platform

* Review : not copy account conf

* Review: Safer test patch

* Review: remove reset_account

* Review: Use executor_job while IO

* Review: Use executor_job while IO 2

* Review: use hass.helpers.storage.Store()

* Review: no IO in tests

* Remove reset from services.yaml

* Review: remove authenticate.return_value = Mock()

* Review: do not initialize the api with the mocked service

* isort

* Review: @MartinHjelmare Test config flow with all steps

* Review: Fix failed tests names

* Codevov: Add one missing test
2019-12-09 17:19:42 +01:00
tetienne
df74272ba6 Remove Tahoma component #29744 (#29745) 2019-12-09 13:35:14 +01:00
Bernhard B
d451e54e34 Add Signal Messenger integration (#28537)
* added signalmessenger integration

* allows to send a message (with an attachment) to one or more
  recipients

* added signalmessenger documentation to manifest file

* remove debug logging from signalmessenger integration

* add signalmessenger to .coveragerc

* fixed typo in signalmessenger manifes

* moved service specific code to own pypi library

* updated pysignalclirestapi dependeny in manifest.json

* added pysignalclirestapi requirement for signalmessenger component

* fixed typo in codeowners

* reworked signalmessenger integration based on code review input

* updated requirements for signalmessenger

* small code improvements in signalmessenger integration

* no need to use the get() method to access dict parameters that are
required

* small changes in signalmessenger integration

* re-ordered import statements
* removed empty "requirements" list (not needed)

* changed import order in signalmessenger integration according to PEP 8

* used isort to order includes in signalmessenger integration

* renamed signalmessenger to signal_messenger

* renamed signalmessenger to signal_messenger in CODEOWNERS file

* changed documentation url in signal_messenger integration to new name

* changed signal messenger naming in .coveragerc
2019-12-09 00:27:06 +01:00
James Nimmo
c78773970b Add IntesisHome Climate Platform (#25364)
* Add IntesisHome Climate Platform

* Add support for IntesisHome and Airconwithme devices

* Implement requested changes from PR review

* Improve error handling for IntesisHome component

* Fix snake-case naming style

* Update exception logging
2019-12-08 15:09:16 +01:00
Franck Nijhof
cc9589cff2 Add Elgato Key Light integration (#29592)
* Add Elgato Key Light integration

* Remove passing in of hass loop

* Tweaks a comment

* Tweaks a function name

* Ensure domain namespace in data exists in entry setup
2019-12-08 09:26:31 +01:00
Rohan Kapoor
b2d5de6a79 Switch iperf3 to generate a new client every time it runs a test (#29495)
* Switch iperf3 to generate a new client every time it runs a test

* Add myself to CODEOWNERS

* Fix imperative mood
2019-12-04 22:49:26 -08:00
Andy Loughran
434b783b4c Update heatmiserv3 integration (#29006)
* Updated heatmiserV3 initial commit

* Fixing heatmiser component

* Updated codeowners and heatmiserV3 version

* Updating files as part of PR process

* Removed extra _LOGGER statements.

* Added in HVAC_MODE_OFF to allowed states to track whether heating on/off

* Handling PR comments

* Removed legacy tests

* fixing pylint errors

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Updated climate based on latest feedback

* Removed cast to int and update requirements

* Update requirements

* Updated heatmiser deps
2019-12-03 06:48:51 +01:00
Felipe Martins Diel
5a24dbf599 Broadlink remote (#26528)
* Add broadlink remote control platform

* Fix order of the imports

* Add remote.py to .coveragerc

* Optimize MAC address validation

* Use storage helper class and improve code readability

* Add me to the manifest as a code owner

* Fix dosctring

* Add me to the code owners

* Remove storage schemas, rename storage keys and improve readability
2019-12-02 13:20:36 -08:00
NobleKangaroo
67498595e4 Add Emulated Hue code owner (#29319) 2019-12-02 21:29:31 +01:00
Andreas Oberritter
64628c1f70 Add ATEN PE component for ATEN eco PDUs (#27960)
* Add ATEN PE component for ATEN eco PDUs

* aten_pe: Require host configuration

* aten_pe: Do not import from other integrations

* aten_pe: Include unnamed outlets

* aten_pe: Avoid get() for config entries having default values

* aten_pe: Fix documentation URI

* aten_pe: Remove unused return value

* aten_pe: Update atenpdu lib to 0.2.0 for asyncio

* aten_pe: Raise exception if initialization fails

* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling
2019-12-01 17:46:12 +01:00
Wim Haanstra
daed314585 Dsmr reader (#28701)
* Added DSMR Reader platform

- Added DSMR Reader platform
- Updated codeowners for other components I added earlier

* Move sensor definitions to new file

* Sensor definitions in new file

* Add energy prices from MQTT

* lint fixes

* Black formatted some files

* Update .coveragerc

* Support transform methods on definitions

* Manifest mangled by Black, fixed

* Visual studio code reformatting dictionary error

* Fix issues with code, remove unrelated manifest changes

* Update CODEOWNERS
2019-11-28 20:30:24 +01:00
Paulus Schoutsen
004476a1f8 Add intent integration to expose intent handle API (#29124)
* Add intent integration to expose intent handle API.

* Run hassfest + fix scaffolding

* Update __init__.py
2019-11-27 11:25:43 +01:00
Colin O'Dell
0849d42dc6 Remove the alarm_control_panel CODEOWNER (#29114)
Although I originally contributed this component, I no longer use it myself and haven't been following the internal development of HA, so I'm no longer a good person to review any further changes to this component.  I would therefore like to relinquish my CODEOWNER status over this component.
2019-11-26 21:57:45 +01:00
Nikolay Vasilchuk
a37260faa9 StarLine integration (#27197)
* Device Tracker works

* Device Tracker works

* Binary Sensor

* Sensor

* Lock

* Switch and service

* New switches

* Update interval options

* WIP

* Translation errors

* Check online state

* WIP

* Move to aiohttp

* Some checks

* CI

* CI

* .coveragerc

* Black

* icon_for_signal_level test

* update_interval renamed to scan_interval

* async logic

* Fix cookie read

* Requirement starline

* Reformat

* Requirements updated

* ConfigEntryNotReady

* Requirement starline

* Lint fix

* Requirement starline

* available status

* Translations

* Expiration to config

* CI

* Linter fix

* Small renaming

* Update slnet token

* Starline version bump

* Fix updates

* Black

* Small fix

* Removed unused fields

* CI

* set_scan_interval service

* deps updated

* Horn switch

* Starline lib updated

* Starline lib updated

* Black

* Support multiple integrations

* Review

* async_will_remove_from_hass

* Deps updated

* Test config flow

* Requirements

* CI

* Review

* Review

* Review

* Review

* Review

* CI

* pylint fix

* Review

* Support "mayak" devices

* Icons removed

* Removed options_flow

* Removed options_flow test

* Removed options_flow test
2019-11-26 11:17:11 -08:00
Adam Cheng
6e7b5b71f5 Add scale and offset to temperature values to Modbus Climate (#27045)
* Add scale and offset to temperature values

* fix (no-else-return)

* Update manifest.json

* Added codeowners
2019-11-25 20:59:01 -08:00
Heine Furubotten
04754b354c Entur public transport code owner (#29080)
* entur code owner

* gen codeowners file
2019-11-25 23:45:33 +01:00
Heine Furubotten
66b7dfec53 Nilu integration code owner (#29081)
* nilu code owner

* gen codeowners file
2019-11-25 23:45:14 +01:00
majuss
3dd5222ec7 Bumped lupupy to version 0.0.18 (#28989)
* Bumped lupupy

* Ran gen req

* Ran gen hassfest


Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2019-11-25 20:21:54 +01:00
Michaël Arnauts
c21c167f4e Use TADO_MODE for temperature overrides in tado climate component. (#29014)
* Use TADO_MODE for temperature overrides in tado climate component.

* Fix typo in pydoc

* Add myself as a code owner

* Update CODEOWNERS file
2019-11-25 14:04:36 +01:00
Chris Mandich
08432c7c09 Add flume support (#27235)
* Add Flume Sensor

Add support for Flume API and sensor

* Add support for choosing timezone

Timezone is now a required option in configuration.yaml

* Add Flume to coveragerc and CODEOWNERS

Add flume to be ommited from testing. Add @ChrisMandich as Flume Code owner

* Revert "Add Flume to coveragerc and CODEOWNERS"

This reverts commit 0b27437a3b.

* Update manifest.json

Added Documentation URL for Flume to HASS.IO

* Update manifest.json

Added missing Newline at EOF.

* Update sensor.py

Update sensor to not required Device ID for configuration. Now loops through all available Type 2 devices and adds them as an entity.

* Update Manifest, CODEOWNERS, and manifest.json

Resolved errors related to code owners and requirements. Using hassfest and gen_requirements_all

* Update sensor.py

Implemented recommendations from @Quentame. Including time zone from Home Assistant, Updated variable names, and Consolidated duplicate functions.

* Implemented suggested changes from @Quentame

This includes: components name, using f-strings instead of concat, snake_case for variables, constants for the addition of future device types, clearer errors, and removed variables no longer in use.

* Update sensor.py

Restored unit_of_measurement. Updated return to "gal".

* Address pylint errors

* Update sensor.py

Include protected attributes in setup_platform.

* Address Pylint errors

homeassistant/components/flume/sensor.py:63:11: W0703: Catching too general exception Exception (broad-except)
homeassistant/components/flume/sensor.py:133:8: R1720: Unnecessary "else" after "raise" (no-else-raise)
homeassistant/components/flume/sensor.py:162:8: R1705: Unnecessary "else" after "return" (no-else-return)
homeassistant/components/flume/sensor.py:236:8: R1720: Unnecessary "else" after "raise" (no-else-raise)

* Update sensor.py

I'm okay with the broad exception clause.
homeassistant/components/flume/sensor.py:65:11: W0703: Catching too general exception Exception (broad-except)

* Update sensor.py

Add more specific exceptions for Try/Except.

* Update Flume Sensory.py

add requirements, exclude from tests, us pyflume pypi package.

* Update sensor.py to support latest pyflume package

* Update manifest

provide better flow of manifest and easier readibility.

* Update manifest.json

Reccomended by @balloob as it is already a core requirement

* Update sensor.py

Add proposed changes from @balloob

* Update requirements_all.txt

pytz is a core dependency, removing flume's requirement for it.

* Update sensor.py

Added @MartinHjelmare recommended changes.

* Update sensor.py

Resolving PyLint error

* Update sensor.py

Remove `KeyError`. Add length check for flume entity list before adding.

* Update sensor.py

* Update pyflume version

* Update imports with isort

* Add line break between standard library and thirdparty imports.

* Remove throttle from sensor.py
2019-11-23 09:55:46 +01:00
Jonas
829e0a7c42 Add Proxmox VE integration (#27315)
* Added the Proxmox VE integration

* Fixed code as described in PR #27315

* Fixed small linting error

* Fix code as described in PR #27315 code review

* Improve code as described in PR #27315
2019-11-22 23:03:41 +01:00
Rohan Kapoor
cd8c281cb6 Add @rohankapoorcom to CODEOWNERS for speedtestdotnet and fastdotcom (#28879) 2019-11-19 13:43:21 -06:00
Steven Impens
475c8ebae2 Add component VersaSense (#24619)
* Add component VersaSense

* Updates based on review

* Changes based on review

* Fixed whitespace

* Fixed lines too long

* Fixed lines too long

* Formatted using black

* Added available property

* Set unavailable property appropriately

* Conversion to f-strings

* Load platform only once per platform

* Fixed duplicate identifiers across multiple devices

* Single call to async_add_entities during setup

* Removed unnecessary async/await syntax

* Added constants for key-value pairs

* Removed async/await syntax

* Added breaks in measurement check

* Added guard clause for discovery_info
2019-11-19 14:05:23 +01:00
Malte Franken
4e9e9efa43 GeoNet NZ Volcanic Alert Level sensor (#26901)
* first version of new integration

* moved icon to shared consts

* added unit tests

* transformed from geolocation to sensor integration

* alert level is now the state of the sensor

* adopted unit tests

* fixed comment

* keep all sensors registered even if the feed update fails intermittently

* bumped version of upstream library

* bumped version of integration library

* regenerated requirements

* bumped version of integration library

* bumped version of integration library

* fixed generated file

* removed commented out code

* regenerated config flow file

* update to latest integration library version

* simplified code

* removed debug log statement

* simplified code structure

* defined constant

* use core interfaces

* moved test and fixture

* sorted imports

* simplified patching

* moved fixture to central config file
2019-11-19 14:00:59 +01:00
Michaël Arnauts
d6e99db38e
Fix Comfoconnect errors during startup (#28802)
* Add callback registrations to async_added_to_hass

* Fix CODEOWNERS

* Fix code formatting

* Requested changes.

* Don't pass unused hass and fix string formatting

* Fix import order.
2019-11-16 15:05:17 +01:00
Davide Varricchio
d796053d9f Add support for Hisense AEH-W4A1 wifi module (AC remote control) (#28641)
* First commit

* First working release, but there's a lot to do

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* First commit

* First working release, but there's a lot to do

* new file:   requirements_test_all.txt

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* new file:   requirements_test_all.txt

* Fighting with tox

* vs Tox round 2

* Isort and updated requirements_test_all.txt

* Fighting with lint

* Implemented available state

* Changed exception type after Travis-ci pylint fails

* Support entry in configuration.yaml

* Removed commented code

* Switched to async

* Minor changes

* Updated library and fixed pylint errors

* Code optimization

* Implemented static ip addresses in configuration.yaml

* Reverted to existing constant

* Corrected pylint wrong-import-order

* Recovery from nuke event (messing all while rebase)

* Resolved Ci error

* Changes for PR

* Corrected temp scale for frontend

* Added test for config entry from configuration.yaml

* Updated dependency

* Check on manual config

* Imported custom exceptions and modified import config

* Optimized

* Change based on PR revision

* Added logging for failure event on manual config

* Tests added but to be corrected

* Edited tests

* Tests updated to ensure no I/O

* Working on tests

* Cheanges based on revision for PR

* Setting librey exception as direct side_effect in test

* Final changes for PR

* Redundand on command solved

* Improved AC logic
2019-11-15 21:22:24 +01:00
Jon Gilmore
aea7c1c0ce Add codeowner for lutron integration (#28682)
* add codeowner for lutron integration

* ran hassfest
2019-11-11 01:51:24 +01:00
Shulyaka
58eeea903f Add pcal9535a integration (#26563)
* Support for PCAL9535A chip

Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>

* Code review changes

* Code review changes

* Fix import order

* Fix import order

* Apply suggestions from code review
2019-11-09 08:14:46 +01:00
Heine Furubotten
af73e54aee Add azure servicebus notify service (#27566)
* Add azure servicebus notify service

* files added to .coveragerc

* fix: import content type from const

* Moved imports to top level

* Code review fixes
+ added code owner
+ fixed config validation with has at least one
+ seperate attributes for dto to asb
* fixed doc link
* async setup instead of sync

* rename all the things
- removed too many ifs
* changed setup back to sync
+ comment about sync IO in lib

* More informative logging

* logging exception -> error
2019-11-07 14:47:44 +01:00
Franck Nijhof
78b83c653a
Add WLED integration (#28542)
* Add WLED integration

* Use f-string for uniq id in sensor platform

* Typing improvements

* Removes sensor & light platform

* Remove PARALLEL_UPDATES from integration level

* Correct type in code comment 'themselves'

* Use async_track_time_interval in async context

* Remove stale code

* Remove decorator from Flow handler

* Remove unused __init__ from config flow

* Move show form methods to sync

* Only wrap lines that can raise in try except block

* Remove domain and platform from uniq id

* Wrap light state in bool object in is_on method

* Use async_schedule_update_ha_state in async context

* Return empty dict in device state attributes instead of None

* Remove unneeded setdefault call in setup entry

* Cancel update timer on entry unload

* Restructure config flow code

* Adjust tests for new uniq id

* Correct typo AdGuard Home -> WLED in config flow file comment

* Convert internal package imports to be relative

* Reformat JSON files with Prettier

* Improve tests based on review comments

* Add test for zeroconf when no data is provided

* Cleanup and extended tests
2019-11-06 23:55:39 +01:00
Jesse Hills
a43095b2b5 Add override switch for juicenet (#28049)
* Add override switch for juicenet

* Update generated files

* Update indentation

* Fix indentation

* Remove unnecessary else statement

* Update homeassistant/components/juicenet/switch.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/juicenet/switch.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Remove state property

* Change string formatting

* Bump juicenet package version again
2019-11-05 14:24:20 +01:00
Bouwe Westerdijk
fb0e20543e Update Plugwise (#28237)
* Plugwise update

* Fix DEFAULT_NAME

* Fix pylint errors

* Remove showing of DHW-status

* Remove `if not None` where possible

* Forgot to remove dhw-related code

* Updated w.r.t. comments from MartinHjelmare

* Remove the illuminance attribute - move to sensor

* Update homeassistant/components/plugwise/climate.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Breaking lines

* Remove thermostat_temperature

* Try fix lint errors.

* Remove spaces

* Remove more spaces
2019-11-05 02:58:17 +01:00
Pascal Vizeli
99c0559a0c
Speech to Text component (#28434)
* Initial commit for STT

* Fix code review
2019-11-04 13:10:42 +01:00
Paulus Schoutsen
79ac77a93d
Almond integration (#28282)
* Initial Almond integration

* Hassfest

* Update library

* Address comments

* Fix inheritance issue py36

* Remove no longer needed check

* Fix time
2019-10-28 23:47:31 -07:00
Josh Bendavid
1e27a1f2b9 Add keyboard_remote trigger on multiple event types and emulate key hold events (#27761)
* convert keyboard_remote to async and add possibility to trigger on multiple event types, as well as emulate key hold events

* update requirements

* cleanup shutdown handling and config handling as well as address other minor comments

* cleanup unused return values and debug message formatting

* move start and stop event listen to separate coroutine plus minor cleanup

* make setup coroutine a function

* fix import order and attribute defined outside of init

* add to codeowners

* update codeowners
2019-10-29 00:59:13 +01:00
J.P. Hutchins
54342d2a4e Add transmission info about torrents that is accessible with templating (#27111)
* Add information about current downloads.

* Cleanup: add "Torrent Info" state attribute

* Add username to codeowners

* Rename state_attributes - device_state_attributes.

* Fix snakecase keys, use f-strings, remove redundant method.

* Access started_torrent_dict directly

* Add return None condition

* Remove redundancy.

* Add missing comma in codeowners list.

* Add missing @ to username.

* Update CODEOWNERS with script.hassfest.

* Remove transmission_downloading, give started_torrents the info.

* Confirm changes.

* Actually approve changes.

* Resolve conflicts.

* Remove leftovers from old torrent_info sensor.

* Remove get_started_torrent_info method.

Old method to display boolean for the removed torrent_info sensor.
2019-10-28 10:20:59 +01:00
escoand
9661efc312 Add Samsung TV automatic protocol detection (#27492)
* added automatic protocol detection

* fix logger tests

* fix async tests

* add missin const.py

* fix log formatting

* wait for first update call

* migrate first tests

* migrated all test functions

* started to use state machine

* updated all tests to use async_setup_component

* slove hints

* update tests

* get state at correct position

* remove impossible tests

* fix autodetect tests

* use caplog fixture

* add test for duplicate

* catch concrete exceptions

* don't mock samsungctl exceptions

* add test for discovery

* get state when possible

* add test for autodetect without connection
2019-10-25 14:32:12 +02:00
Floris Van der krieken
b1fcecd526 Add Unifi Led (#27475)
* Added Unifi Led

* fixed manifest

* fixed style issue

* removed unused setting

* added sugested changes.

* fixed order

* fixed settings that are required

* Fix review issues

* fix variable name that was too short

* Testing something

* Reverted to a previous version for testing

* Reverted testing changes.
2019-10-24 17:59:25 +02:00
Per-Øyvind Bruun
852cbad965 New platform for Microsoft Teams (#27981)
* New Microsoft Teams notification service

* Updated codeowners

* Updated requirements_all

* Changed from WEBHOOK_ID to URL

* Moved try/except block
2019-10-23 09:32:14 +02:00
Ernst Klamer
acc3646ef3 Add Solar-Log platform (#27036)
* Add Solar-Log sensor

* Codeowners update

* Update homeassistant/components/solarlog/manifest.json

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* remove sunwatcher from gen_requirements_all.py

* remove sunwatcher from requirements_test_all.txt

* Remove scan_interval as configuration variable

I've set it to a fixed scan_interval of 1 minute. Removed the configuration option.

* Fix black format

* Config flow added (__init__.py)

* Config flow added (manifest.json)

* Config flow added (const.py)

* Config flow added (config_flow.py)

* Config flow added (strings.json)

* Config flow added (en.json translation)

* Config flow added (sensor.py rewritten)

* Config flow added (sensor.py)

* Config flow added (config_flows.py)

* resolve conflict config_flows.py

* Add tests

* add tests

* add tests

* Update .coverage to include all files for solarlog

* Fix await the unload

* Adjust icons, add http:// to default host

* Change icons

* Add http:// to host if not provided, fix await

* Add http:// to host if not provided, fix await

* Adjust tests for http:// added to host

* remove line

* Remove without http:// requirement

* Remove without http;// requirement
2019-10-22 23:31:43 -07:00
Rami Mosleh
09f9875ccf Glances config flow (#27221)
* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* update .coverage.py

* add codeowner

* add test_options

* Fixed typos, Added import, fixed tests

* sort imports

* remove commented code
2019-10-21 10:17:21 +02:00
Kevin McCormack
936dac2270 Add Vivotek camera component code owner (#28024) 2019-10-21 10:06:16 +02:00
Miroslav Ždrale
22b29a8005 Add option to disable HTTPS verification in Luci component (#27946)
* Add option to disable HTTPS verification in Luci component

* Update code owners

* Update code owners
2019-10-20 09:43:44 -07:00
Bendik Brenne
9625e0463b Add sinch integration (notify component) (#26502)
* Added sinch integration (notify component)

* Updated requirements

* Fixes according to lint

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/sinch/notify.py

Co-Authored-By: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Adds @bendikrb as codeowner

* Imports to the top. Catching specific exceptions. Logic fixes

* Updated CODEOWNERS

* Reformatting (black)

* Added sinch component to .coveragerc

* Conform to pylintrc

* Okay, Mr. Black

* Fixed: Catching too general exception Exception
2019-10-17 21:44:09 -07:00
Andrey Kupreychik
bd95a89f45 Bump ndms2-client to 0.0.10 (#27734) 2019-10-16 20:28:12 +02:00
Bogdan Vlaicu
c8f6484095 New sensor platform integration for Orange and Rockland Utility smart energy meter (#27571)
* New sensor platform integration for Orange and Rockland Utility smart energy meter

* New sensor platform integration for Orange and Rockland Utility smart energy meter

* bumped the oru py version to 0.1.9

* Added PLATFORM_SCHEMA
Adde unique_id property
Changed logger level from info to debug when printing the updated sensor value
Set the SCAN_INTERVAL to 15 mins
Added exception handling durin init when creating the oru meter instance

* Various fixes base on the PR review
+ Added SCAN_INTERVAL for 15 mins

* fixed path to documentation
2019-10-16 09:52:30 +02:00
Chris Caron
3cb844f22c Add Apprise notification integration (#26868)
* Added apprise notification component

* flake-8 fixes; black formatting + import merged to 1 line

* pylint issues resolved

* added github name to manifest.json

* import moved to top as per code review request

* manifest formatting to avoid failing ci

* .coveragerc updated to include apprise

* removed block for written tests

* more test coverage

* formatting as per code review

* tests converted to async style as per code review

* increased coverage

* bumped version of apprise to 0.8.1

* test that mocked entries are called

* added tests for hass.service loading

* support tags for those who identify the TARGET option

* renamed variable as per code review

* 'assert not' used instead of 'is False'

* added period (in case linter isn't happy)
2019-10-15 00:53:59 +02:00
shred86
1774a1427b Add abode config entries and device registry (#26699)
* Adds support for config entries and device registry

* Fixing string formatting for logger

* Add unit test for abode config flow

* Fix for lights, only allow one config, add ability to unload entry

* Fix for subscribing to hass_events on adding abode component

* Several fixes from code review

* Several fixes from second code review

* Several fixes from third code review

* Update documentation url to fix branch conflict

* Fixes config flow and removes unused constants

* Fix for switches, polling entry option, improved tests

* Update .coveragerc, disable pylint W0611, remove polling from UI

* Multiple fixes and edits to adhere to style guidelines

* Removed unique_id

* Minor correction for formatting error in rebase

* Resolves issue causing CI to fail

* Bump abodepy version

* Add remove device callback and minor clean up

* Fix incorrect method name

* Docstring edits

* Fix duplicate import issues from rebase

* Add logout_listener attribute to AbodeSystem

* Add additional test for complete coverage
2019-10-13 20:01:04 +02:00
Malte Franken
15c56f1f64 Move imports in geo_rss_events component (#27313)
* move imports to top-level

* fixed patch path

* added myself as codeowner

* regenerated codeowners
2019-10-08 12:50:45 +02:00
Aaron Godfrey
feb1986459 Fix the todoist integration (#27273)
* Fixed the todoist integration.

* Removing unused import

* Flake8 fixes.

* Added username to codeowners.

* Updated global codeowners
2019-10-07 10:40:52 -07:00
Sergio Conde Gómez
f6b8cffeaf Add PTZ support to Foscam camera component (#27238)
* Add PTZ support to Foscam camera component

* Address review comments:

 - Move service to foscam domain
 - Use `dict[key]` for required schema keys or with defaults
 - Fix sync operations in async context
 - Remove excessive logging

* Fix import order

* Move all the initialization to setup_platform and fix motion detection status logic

* Move function dictionary out of the function.

* Change user input to lowercase snake case

* Change user input to lowercase snake case

* Fix service example value

* Omit foscam const module from code coverage tests

* Add myself to foscam codeowners
2019-10-07 13:17:43 +02:00
Santobert
bd6bbcd5af Neato config flow (#26579)
* initial commit

* Minor changes

* add async setup entry

* Add translations and some other stuff

* add and remove entry

* use async_setup_entry

* Update config_flows.py

* dshokouhi's changes

* Improve workflow

* Add valid_vendors

* Add entity registry

* Add device registry

* Update entry from configuration.yaml

* Revert unneccesary changes

* Update .coveragerc

* Prepared tests

* Add dshokouhi and Santobert as codeowners

* Fix unload entry and abort when already_configured

* First tests

* Add test for abort cases

* Add test for invalid credentials on import

* Add one last test

* Add test_init.py with some tests

* Address reviews, part 1

* Update outdated entry

* await instead of add_job

* run IO inside an executor

* remove faulty test

* Fix pylint issues

* Move IO out of constructur

* Edit error translations

* Edit imports

* Minor changes

* Remove test for invalid vendor

* Async setup platform

* Edit login function

* Moved IO out if init

* Update switches after added to hass

* Revert update outdated entry

* try and update new entrys from config.yaml

* Add test invalid vendor

* Default to neato
2019-10-06 13:05:51 +02:00
ochlocracy
9a5c1fbaed Add SecurityPanelController for alarm_control_panel to alexa (#27081)
* Implemented Alexa.SecurityPanelController Interface for alarm_control_panel
https://developer.amazon.com/docs/device-apis/alexa-securitypanelcontroller.html

* Implemented Tests for Alexa.SecurityPanelController Interface for alarm_control_panel

* Added additional AuthorizationRequired error handling

* Removed optional exitDelayInSeconds

* Updating elif to if to please pylint

* Adding self to code owners.

* Adding self to code owners.

* Added AlexaEndpointHealth Interface to alarm_control_panel entities.

* Added additional entity tests.

* Code reformatted with Black.

* Updated alexa alarm_control_panel tests for more coverage.

* Updated alexa alarm_control_panel tests for more coverage. Fixed Test.

* Adding self to code owners.
2019-10-04 08:41:47 -07:00
Maciej Bieniek
8ba4ee1012 Add Airly integration (#26375)
* Add Airly integration

* Update .coveragerc file

* Remove AVAILABLE_CONDITIONS and fix device_class

* Don't create client on every update

* Rename client to session

* Rename state_attributes to device_state_attributes

* Remove log latitude and longitude

* Fix try...except

* Change latitude and longitude to HA defaults

* _show_config_form doesn't need coroutine

* Simplify config_flow errors handlig

* Preetier

* Remove unnecessary condition

* Change sensor platform to air_quality

* Remove PM1

* Make unique_id more unique

* Remove ,

* Add tests for config_flow

* Move conf to CONFIG

* Remove domain from unique_id

* Change the way update of attrs

* Language and attrs

* Fix attrs

* Add aiohttp error handling

* Throttle as decorator

* Suggested change

* Suggested change

* Invert condition

* Cleaning

* Add tests

* Polish no sesnor error handling

* Better strings

* Fix test_invalid_api_key

* Fix documentation url

* Remove unnecessary test

* Remove language option

* Fix test_invalid_api_key once again

* Sort imports

* Remove splits in strings
2019-10-04 13:58:29 +02:00
jjlawren
adab228012 Unload cert_expiry config entries (#27150)
* Allow cert_expiry unloading

* Update codeowners
2019-10-03 16:50:15 -07:00
Paulus Schoutsen
f184bf4d85 Add Google Report State (#27112)
* Add Google Report State

* UPDATE codeowners"

* Add config option for dev mode

* update library

* lint

* Bug fixes
2019-10-03 13:02:38 +02:00
Felix Eckhofer
9c49b8dfc1 Fix generated comment in CODEOWNERS (#27115)
codeowners.py was moved from `/script/manifest/` to `/script/hassfest/`
in e8343452cd.
2019-10-02 09:34:27 -07:00
fredericvl
2e3bc5964d Add saj component (#26902)
* Add saj component

* Performed requested changes after review

* Performed requested changes after review 2

* Performed requested changes after review 3

* Black

* Bump pysaj library version

* Changes after review

* Fix flake8

* Review changes + isort
2019-10-01 13:25:57 +02:00
Tiit Rätsep
48d07467d9 Add support for SOMA Smartshades devices (#26226)
* Add Soma integration

* Fixed cover position get/set

* Try to list devices before creating config entries to see if Soma Connect can be polled

* Style fixes

* Updated requirements

* Updated .coveragerc to ignore Soma component

* Fixed linter errors

* Implemented stop command

* Test coverage fixes according to feedback

* Fixes to code according to feedback

* Added error logging and tested config from yaml

* Indentation fix

* Removed unnecessary method

* Wrong indentation

* Added some tests

* Added test for import step leading to entry creation

* Added feedback to user form in case of connection error

* Minor fixes according to feedback

* Changed exception type in error handling for connection to Connect

* To keep API consistent for Google Home and Alexa we swapped the open/closed position values back and I reversed them in this integration as well

* regenerated requirements, ran black, addde __init__.py to ignore file

* Added pysoma library to gen_requirements_all.py

* Added missing test case

* removed useless return value
2019-09-30 14:23:08 +02:00
Martin Hjelmare
9f6fade236
Add xbox live custom update interval (#26939)
* Add xbox_live custom update schedule

* Set a default update interval that is within the free limit. Consider
  number of users per api key when setting interval.

* Add codeowner

* Add callback decorator
2019-09-27 08:02:58 +02:00
Petr Vraník
3efdf29dfa Centralize rainbird config and add binary sensor platform (#26393)
* Update pyrainbird to version 0.2.0 to fix zone number issue:

- home-assistant/home-assistant/issues/24519
- jbarrancos/pyrainbird/issues/5
- https://community.home-assistant.io/t/rainbird-zone-switches-5-8-dont-correspond/104705

* requirements_all.txt regenerated

* code formatting

* pyrainbird version 0.3.0

* zone id

* rainsensor return state

* updating rainsensor

* new version of pyrainbird

* binary sensor state

* quiet in check format

* is_on instead of state for binary_sensor

* no unit of measurement for binary sensor

* no monitored conditions config

* get keys of dict directly

* removed redundant update of state

* simplified switch

* right states for switch

* raindelay sensor

* raindelay sensor

* binary sensor state

* binary sensor state

* reorganized imports

* doc on public method

* reformatted

* add irrigation service to rain bird, which allows you to set the duration

* rebased on konikvranik and solved some feedback

* add irrigation service to rain bird

* sensor types to constants

* synchronized register service

* patform discovery

* binary sensor as wrapper to sensor

* version 0.4.0

* new config approach

* sensors cleanup

* bypass if no zones found

* platform schema removed

* Change config schema to list of controllers

some small code improvements as suggested in CR:
 - dictionary acces by []
 - just return instead of return False
 - import order
 - no optional parameter name

* some small code improvements as suggested in CR:
 - supported platforms in constant
 - just return instead of return False
 - removed unused constant

* No single controller configuration

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* pyrainbird 0.4.1

* individual switch configuration

* imports order

* generate default name out of entity

* trigger time required for controller

* incorporated CR remarks:
- constant fo rzones
- removed SCAN_INTERVAL
- detection of success on initialization
- removed underscore
- refactored if/else
- empty line on end of file
- hass as first parameter

* import of library on top

* refactored

* Update homeassistant/components/rainbird/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* validate time and set defaults

* set defaults on right place

* pylint bypass

* iterate over values

* codeowner

* reverted changes:

* irrigation time just as positive integer. Making it complex does make
sense
* zone edfaults fullfiled at runtime. There is no information about
available zones in configuration time.

* codeowners updated

* accept timedelta in irrigation time

* simplified time calculation

* call total_seconds

* irrigation time as seconds.

* simplified schema
2019-09-26 11:24:03 +02:00
Rami Mosleh
82b77c2d29 Add config flow to transmission (#26434)
* Add config flow to transmission

* Reworked code to add all sensors and switches

* applied fixes

* final touches

* Add tests

* fixed tests

* fix get_api errors and entities availabilty update

* update config_flows.py

* fix pylint error

* update .coveragerc

* add codeowner

* add test_options

* fixed test_options
2019-09-26 11:14:57 +02:00
Martin Hjelmare
770ad86f12
Add mysensors codeowner (#26917) 2019-09-26 07:42:46 +02:00
Mark Coombes
f6995b8d17 Add config flow to ecobee (#26634)
* Add basic config flow

* Fix json files

* Update __init__.py

* Fix json errors

* Move constants to const.py

* Add ecobee to generated config flows

* Update config_flow for updated API

* Update manifest to include new dependencies

Bump pyecobee, add aiofiles.

* Update constants for ecobee

* Modify ecobee setup to use config flow

* Bump dependency

* Update binary_sensor to use config_entry

* Update sensor to use config_entry

* Update __init__.py

* Update weather to use config_entry

* Update notify.py

* Update ecobee constants

* Update climate to use config_entry

* Avoid a breaking change on ecobee services

* Store api key from old config entry

* Allow unloading of config entry

* Show user a form before import

* Refine import flow

* Update strings.json to remove import step

Not needed.

* Move third party imports to top of module

* Remove periods from end of log messages

* Make configuration.yaml config optional

* Remove unused strings

* Reorganize config flow

* Remove unneeded requirement

* No need to store API key

* Update async_unload_entry

* Clean up if/else statements

* Update requirements_all.txt

* Fix config schema

* Update __init__.py

* Remove check for DATA_ECOBEE_CONFIG

* Remove redundant check

* Add check for DATA_ECOBEE_CONFIG

* Change setup_platform to async

* Fix state unknown and imports

* Change init step to user

* Have import step raise specific exceptions

* Rearrange try/except block in import flow

* Convert update() and refresh() to coroutines

...and update platforms to use async_update coroutine.

* Finish converting init to async

* Preliminary tests

* Test full implementation

* Update test_config_flow.py

* Update test_config_flow.py

* Add self to codeowners

* Update test_config_flow.py

* Use MockConfigEntry

* Update test_config_flow.py

* Update CODEOWNERS

* pylint fixes

* Register services under ecobee domain

Breaking change!

* Pylint fixes

* Pylint fixes

* Pylint fixes

* Move service strings to ecobee domain

* Fix log message capitalization

* Fix import formatting

* Update .coveragerc

* Add __init__ to coveragerc

* Add option flow test

* Update .coveragerc

* Act on updated options

* Revert "Act on updated options"

This reverts commit 56b0a859f2e3e80b6f4c77a8f784a2b29ee2cce9.

* Remove hold_temp from climate

* Remove hold_temp and options from init

* Remove options handler from config flow

* Remove options strings

* Remove options flow test

* Remove hold_temp constants

* Fix climate tests

* Pass api key to user step in import flow

* Update test_config_flow.py

Ensure that the import step calls the user step with the user's api key as user input if importing from ecobee.conf/validating imported keys fails.
2019-09-25 22:38:21 +02:00
Kevin Eifinger
5c0fa35d4a Add here_travel_time (#24603)
* Add here_travel_time

* Bump herepy version to 0.6.2

* Update requirements_all.txt

* Disable pylint and catch errors

* Add herepy to requirements_test_all

* Correctly place test req for herepy

* use homeassistant.const.LENGTH_METERS

* Implemented Requested Changes

* Better error message for cryptic error code

* add requested changes

* add_entities instead of async

* Add route attr and distance in km instead of m

* fix linting errors

* attribute duration in minutes instead of seconds

* Correct pattern for longitude

* dont split attribute but rather local var

* move strings to const and use travelTime

* Add tests

* Add route for pedestrian and public

* fix public transport route generation

* remove print statement

* Standalone pytest

* Use hass fixture and increase test cov
_resolve_zone is redundant

* Clean up redundant code

* Add type annotations

* Readd _resolve_zone and add a test for it

* Full test cov

* use caplog

* Add origin/destination attributes
According to https://github.com/home-assistant/home-assistant/pull/24956

* Add mode: bicycle

* black

* Add mode: publicTransportTimeTable

* Fix error for publicTransportTimeTable
Switch route_mode and travel_mode in api request.

* split up config options

* More type hints

* implement *_entity_id

* align attributes with google_travel_time

* route in lib
apply requested changes

* Update requirements_all.txt

* remove DATA_KEY

* Use ATTR_MODE

* add attribution

* Only add attribution if not none

* Add debug log for raw response

* Add _build_hass_attribution

* clearer var names in credentials check

* async _are_valid_client_credentials
2019-09-23 11:50:18 +02:00
Franck Nijhof
5c7f869f9b Remove deprecated sytadin integration (ADR-0004) (#26819)
* Remove deprecated sytadin integration (ADR-0004)

* Update code owners file

* Cleanup coveragerc
2019-09-23 08:44:38 +02:00
Tommy Larsson
60f0988435 Add Ombi integration (#26755)
* Add Ombi integration

* Black

* Remove trailing comma

* Change dict.get to dict[key] for known keys

* Remove monitored conditions from config

* Define SCAN_INTERVAL for default scan interval

* Adjust requests syntax and add music_requests

* Remove Ombi object initialization

* Move constants to const.py

* Fix imports

* Set pyombi requirement to version 0.1.3

* Add services.yaml

* Add config schema and setup for integration

* Set pyombi requirement to version 0.1.3

* Fix syntax for scan interval

* Fix datetime import

* Add all files from ombi component

* Move imports around

* Move imports around

* Move pyombi import to top of module

* Move scan_interval to sensor module

* Add custom validator for urlbase

* Add guard clause for discovery_info

* Add service validation schemas and constants

* Bump pyombi version

* Adjust urlbase validation

* Add exception warnings for irretrievable media

* Bump pyombi

* Change from .get to dict[key]

* Change schema and conf variable names

* Set return to return false

* Remove unneeded return
2019-09-23 00:57:39 +02:00
Michał Mrozek
fbe85a2eb2 Add Kaiterra integration (#26661)
* add Kaiterra integration

* fix: split to multiple platforms

* fix lint issues

* fix formmating

* fix: docstrings

* fix: pylint issues

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Adjust code based on suggestions

* Update homeassistant/components/kaiterra/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-09-22 23:49:09 +02:00
John Luetke
88dcecab39 Add myself as a pi_hole codeowner (#26796) 2019-09-21 21:39:49 +02:00
scheric
9d0cb899ec Add optimizer data to solaredge_local (#26708)
* making SENSOR_TYPES universal

* bump solaredge-local version 0.2.0

* add maintenance data

* add calculations for optimizer data

* add new sensors

* add statistics lib

* update sensor data setting

* making api requests universal

* fix Cl

* Update requirements_all.txt

* fix temperature

* fix f-strings

* Style guidelines

* shortening line length

* PEP8 test

* flake8

* Black test

* revert line length to 80

* Repair line 12

* black

* style change

* Black

* black using pip

* fix for pylint

* added proper variable name

* for loop cleanup

* fix capitals

* Update units

* black

* add check for good connection to inverter

* Roundig large numbers

* Add myself to codeowners

* Fix layout manifest

* Fix layout manifest

* Update manifest.json

* repair manifest layout

* remove newline in manifest

* add myself to CODEOWNERS
2019-09-21 20:07:53 +02:00
Askarov Rishat
aaf0f9890d Add transport data from maps.yandex.ru api (#26766)
* adding feature obtaining Moscow transport data from maps.yandex.ru api

* extracting the YandexMapsRequester to pypi

* fix code review comments

* fix stop_name, state in datetime, logger formating

* fix comments

* add docstring to init

* rename, because it works not only Moscow, but many another big cities in Russia

* fix comments

* Try to solve relative view in sensor timestamp

* back to isoformat

* add tests, update external library version

* flake8 and black tests for sensor.py

* fix manifest.json

* update tests, migrate to pytest, async, Using MockDependency

* move json to tests/fixtures

* script/lint fixes

* fix comments

* removing check_filter function

* fix typo

* up version on manifest.json

* up version to 0.3.7 in requirements_all.txt
2019-09-20 18:12:36 +02:00
Pascal Vizeli
9e44d1af19
Revert "Add transport data from maps.yandex.ru api (#26252)" (#26762)
This reverts commit 9e2cd5116a.
2019-09-20 15:55:43 +02:00
Askarov Rishat
9e2cd5116a Add transport data from maps.yandex.ru api (#26252)
* adding feature obtaining Moscow transport data from maps.yandex.ru api

* extracting the YandexMapsRequester to pypi

* fix code review comments

* fix stop_name, state in datetime, logger formating

* fix comments

* add docstring to init

* rename, because it works not only Moscow, but many another big cities in Russia

* fix comments

* Try to solve relative view in sensor timestamp

* back to isoformat

* add tests, update external library version

* flake8 and black tests for sensor.py

* fix manifest.json

* update tests, migrate to pytest, async, Using MockDependency

* move json to tests/fixtures

* script/lint fixes

* fix comments

* removing check_filter function

* fix typo
2019-09-19 23:41:44 +02:00
Anders Melchiorsen
aac2c3e91c Update codeowners (#26733) 2019-09-19 14:39:57 -07:00
Penny Wood
b68b8430a4 Izone component (#24550)
* iZone component

* Rename constants to const.

* Changes as per code review.

* Stop listening if discovery times out.

* Unload properly

* Changes as per code review

* Climate 1.0

* Use dispatcher instead of listener

* Free air settings

* Test case for config flow.

* Changes as per code review

* Fix error on shutdown

* Changes as per code review

* Lint fix

* Black formatting

* Black on test

* Fix test

* Lint fix

* Formatting

* Updated requirements

* Remaining patches

* Per code r/v
2019-09-19 23:31:54 +02:00
Pascal Vizeli
4be0c057d2 Fix Nuki issues (#26689)
* Fix Nuki issues

* remove stale code

* Add comments

* Fix lint
2019-09-17 11:44:43 +02:00
chriscla
57833f5b1e Refactor nzbget to support future platform changes (#26462)
* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Re-factor nzbget platform to enable future features.

* Use pynzbgetapi instead of raw HTTP requests

* Using pynzbgetapi

* Pinning pynzbgetapi version.

* Requiring pynzbgetapi 0.2.0

* Addressing review comments

* Refreshing requirements (adding pynzbgetapi)

* Remove period from logging message

* Updating requirements file

* Add nzbget init to .coveragerc

* Adding nzbget codeowner

* Updating codeowners file
2019-09-15 02:44:19 +02:00
jjlawren
6eeb01edc4 Remove default host for Plex config (#26583)
* Remove default host, allow config with token(+server)

* Require one of host or token

* Oops

* Adjust schema

* Fix schema

* Add self as codeowner

* Update CODEOWNERS
2019-09-11 20:21:08 +02:00
Daniel Shokouhi
2b30f47f4b Add Obihai integration (#26537)
* Add Obihai integration

* Lint

* Lint and bump library for multiple ports fix

* Review comments

* Review comments

* Correct errors

* Review comments

* Review comments
2019-09-11 19:26:50 +02:00
Pascal Vizeli
f3fa073045
Bump UPC connect / fix auth issue (#26570)
* Bump UPC connect / fix auth issue

* Fix lint

* Fix platform schema

* Fix config value

* Address comment / add session cleanup

* Fix device handling
2019-09-11 13:17:07 +02:00
indykoning
a4fd991ab5 Add growatt server integration (#25635)
* Added growatt server integration

* Ran black formatter

* Processed feedback.

* Made attributes more readable.

* Create a sensor for each property.

* Added unique_ids

* Accidentally flipped functions

* Added dynamic device classes.

* Fixed stale session.
2019-09-09 23:47:44 +02:00
Florent Thoumie
0abb2f3eb8 Add new integration for Jandy iAqualink pool control (#26034)
* Import new iaqualink component with climate platform.

* Style and unittest changes, fix async_step_import.

* Reorder imports.

* Fix stale doctstrings and add unittest.
2019-09-06 22:21:56 +02:00
Hans Oischinger
a72d9da9f4 Add Viessmann ViCare Climate platform (#26151)
* Add Viessmann ViCare Climate platform

* Add water_heater and fix review comments
Update to latest PyVicare (0.1.0)

* Move PyVicare API creation to component

* More review fixes

* Return false if api creation fails

* Fix logging format

* Update PyVicare 0.1.1 to fix json issues

* Formatting fixes
2019-09-06 22:09:03 +02:00
Pierre
6acfede512 Add atome sensor platform (#26197)
* Atome sensor platform - provides live data from Linky energy meters with Atome device from Total/Direct energie

* Proper requirements, added code ownership

* Do not cover atome component

* Proper PEP8 import, proper use of const, added missing docstring etc

* Proper PEP8 import, proper use of const, added missing docstring etc

* Integrate recommendations from MartinHjelmare

* Init shall remain as clean as possible, we don't want side effect

* Add daily,weekly,monthly,yearly sensors. Now depends on pyatome 0.1

* Requirements regenerated for atome component

* Refactored the way we update sensors

* Removed some un-necessary returns and unused variable
2019-09-04 20:20:20 +02:00
Malte Franken
d1bc0c1dd9 NSW Rural Fire Service icon for geolocation entities (#26416)
* define icon

* add myself as codeowner
2019-09-04 11:33:29 +02:00
Quentame
b4058b5c7f Add config flow to linky (#26076)
* Linky: setup ConfigFlow

* async_track_time_interval

* Review from @MartinHjelmare 1

* Review from @MartinHjelmare 2

* Review from @MartinHjelmare 3

* Review from @MartinHjelmare 4

* black --fast homeassistant tests

* Bump pylinky to 0.4.0 and add error user feedback

* Fix .coveragerc

* Linky platform moved to integration in config.yml and with multiple accounts

* Remove useless logs

* Review from @MartinHjelmare 5

* Add config flow tests

* Add config flow tests : login + fetch on failed
2019-09-04 07:04:26 +02:00
Alexander
330ae0d885 Add support Slide cover (#25913)
* Add support GoSlide cover

* Fixed Parameters differ from overridden
Fixed Removed other pylint warnings

* Renamed GoSlide to Slide, because of Innovation in Motion rebranding

* Fixed codeowners file

* Fixed requirements file

* Removed pylint: disable=unused-argument
Removed DOMAIN not exist check
Changed if to min/max
Changed 3rd party import to top of the module
Removed timeout/retry parameters
Removed unused constants
Added check for discovery_info is none
Changed pass slide object instead of full hass object
Changed pass api object instead of full hass object
Added unique_id functionality
Removed entity_id/name properties
Removed supported_features/state functions

* Fixed unused variables

* Changed Slide API uses snake names
Changed Improved exception handling
Changed Updated Slide API to 0.50.0

* Changed moved exceptions into goslide-api
Changed retry setup into coroutine

* Changed str(err) to err
Changed invert if result to if not result
2019-09-03 10:09:25 -07:00
Malte Franken
ecaadfed3a USGS Earthquakes icon for geolocation entities (#26353)
* define icon

* updated tests

* added codeowner

* updated codeowners
2019-09-02 13:37:11 +02:00
Aleix Murtra
1617c2cd64 Add BeeWi SmartClim BLE sensors (#26174)
* Add BeeWi SmartClim BLE temperature and humidity sensor

* Update missing CODEOWNERS and .coveragerc files

* Updated requirements file

* Update documentation

* Fixed requested changes and decoupled IO library

* Add unique_id property

* Improve unique_id
2019-09-01 18:05:46 +02:00
Robert Van Gorkom
614cf74225 Add Withings support (#25154)
* Rebasing with a clean branch.
Addressing PR feedback.
Cleaning up some static code checks.
Fixing bug with saving credentials.

* Removing unecessary change.

* Caching data manager.

* Removing configurable measures.

* Using import step in config flow.

* Updating config flows.

* Addressing PR feedback.

* Formatting source.

* Addressing PR feedback and rebasing.
2019-08-31 14:30:59 +02:00
Maikel Punie
33bd9c83fb Enable cert_expiry config entries (#25624)
* Enable cert_expiry config entries

* add black

* lint fixes

* Rerun black

* Black on json files is a bad idea

* Work on comments

* Forgot the lint

* More comment work

* Correctly set defaults

* More comments

* Add codeowner

* Fix black

* More comments implemented

* Removed the catch

* Add helper.py from cert_expiry to .coveragerc
2019-08-28 19:35:09 +02:00
MatthewFlamm
17750a604e Add NWS weather (#23647)
* Add nws weather.

* Hassfest

* Address multiple comments

* Add NWS icon weather code link

* Add metar fallback.

Use metar code from nws observation if normal api is missing data.

* only get 1 observation - we dont use more than 1

* add mocked metar for tests

* lint

* mock metar package for all tests

* add check for metar attributes

* catch errors in setup

* add timeout error

* handle request exceptions

* check and test for missing observations

* refactor to new pynws

* change to simpler api

* Make py3.5 compatible

Remove f string

* bump pynws version

* gen_requirements

* fix wind bearing observation

* Revert "Make py3.5 compatible"

This reverts commit 4946d91779.

* Precommit black missed a file?

* black test

* add exceptional weather condition

* bump pynws version

* update requirements_all

* address comments

* move observation and forecast outside try-except-else

* Revert "move observation and forecast outside try-except-else"

This reverts commit 53b78b3283.

* remove else from update forecast block

* remove unneeded ConfigEntryNotReady import

* add scan_interval, reduce min_time_between_updates

* pytest tests

* lint test docstring

* use async await

* lat and lon inclusive in config
2019-08-23 14:13:06 +02:00
SukramJ
bc5cec97f4 Add myself as codeowner to HmIP Cloud (#26140) 2019-08-22 09:00:15 -07:00
Anders Melchiorsen
7ab36e0381
Update eternalegypt to 0.0.10 (#26117) 2019-08-21 20:54:20 +02:00
Gerard
38ce4039c3 Update bimmer_connected to 0.6.0 (#26098)
* Update bimmer_connected to 0.6.0

* Correct file properties
2019-08-21 09:11:06 +02:00
Joakim Sørensen
d96edea6e2 Remove the googlehome integration (#26035) 2019-08-20 10:54:54 -07:00
Pascal Vizeli
97d3f49bb8 Docker ADR (#26085)
* Migrate Docker image to Hass.io / Multiarch

* Fix sudo

* Update CODEOWNERS

* Fix manifest

* Add more logic

* fix handling

* Move dockerfile

* Modify options
2019-08-20 10:37:55 -07:00
Tomas Kislan
eee2b2d543 Add Minio component (#23567)
* Add minio implementation

* Static check changes

* Added docstrings

* Update docstrings

* Update docstrings

* Fix linter errors

* Finally fix all docstring errors

* Create services.yaml

* Update CODEOWNERS

* Final changes

* Remove double underscores

* Minor changes

* Update config.yml

* Review changes

* Added tests

* Fix lint errors

* Move tests from unittest to pytest

* Add minio as test requirement

* Update test_minio_helper.py

* Better event thread handling, added hass test

* Update tests

* Fixed lint errors

* Update test_minio.py

* Review changes

* More review changes

* Removed tests

* Applied code style changes

* Reformat test code
2019-08-20 11:56:11 +02:00
Philipp Danner
75e18d4282 Add Keba charging station/wallbox as component (#24484)
* Add Keba charging station wallbox component

* Added start/stop commands (ena 0 and ena 1)

* added refresh_interval parameter and fixed authorization

* fixed max line length

* deactivate failsafe mode if not set in configuration

* extracted I/O code to pypi library

* updated services.yaml

* pinned version of requirements

* fixed typos, indent and comments

* simplified sensor generation, fixed unique_id and name of sensors

* cleaned up data extraction

* flake8 fixes

* added fast polling, fixed unique_id, code cleanup

* updated requirements

* fixed pylint

* integrated code styling suggestions

* fixed pylint

* code style changes according to suggestions and pylint fixes

* formatted with black

* clarefied variables

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* fixed behaviour if no charging station was found

* fix pylint

* Update homeassistant/components/keba/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-19 14:29:26 +02:00
Joakim Sørensen
ef8bc78c53 Remove the ruter integration (#26041) 2019-08-18 10:55:19 +02:00
Abílio Costa
a64dccc80b edp_redy: remove component (#25971)
The service has moved to a new portal and the previous API does not work
anymore.
2019-08-15 15:53:12 -07:00
Malte Franken
9e6732e530 GeoNet NZ Quakes feed integration (#25736)
* initial working version

* support configured unit system and convert distance automatically

* properly unloading integration when removed and stopping refreshes

* ran isort

* fixed pylint

* introduced time filter of seven days into past

* adding unit tests

* fixed lint

* removed unused code

* added test case

* added test case for config flow

* fixed lint

* fixed comment

* removed unused test code

* increased test coverage

* fixed filtering by time

* changed wording in config flow

* reformatted with black

* removed unused logger

* fixed black

* changed default mmi

* reduced the options in the config flow form; fixed a few schema options and processing of data

* moved unsubscribing signals

* fixed minimum magnitude and modified tests

* fixed radius in imperial unit system

* increased test coverage

* simplified code

* fixed lint

* changed string formatting; simplified code

* removed unused strings

* added translation
2019-08-10 12:50:27 +02:00
Jeff Irion
70dfe42adb Make myself the codeowner for androidtv (#25697) 2019-08-05 01:03:37 +02:00
Maikel Punie
7ee3dd137b Fix velbus codeowner (#25649) 2019-08-02 09:49:24 +02:00
Tom
9f3e388b04 Add Plugwise component (#25533)
* Added Plugwise component

* pylint fixes

* Additional pylints (local tox not noticing these)

* Changes according to review

* CI flake8 correction

* Applying Black

* Review changes, without exception and schema

* Review changes, exception improvement

* Review changes, exception correctio and schema cleanup

* Further cleaning as per review

* Removed blank line

* Add debugging to API init

* Add debugging to API init without dot
2019-08-01 22:22:57 +02:00
ChristianKuehnel
92991b53c4 remove myself from CODEOWNDERS (#25593)
* remove myself from CODEOWNDERS

Sorry, I do not have time right now to work on HomeAssistant, so I'm removing myself from the CODEOWNERS.

* Update manifest.json
2019-07-31 10:59:56 -07:00
Maikel Punie
1f9f201571 Enable velbus config entries (#25308)
* Initial work on config_flow

* Finish config flow

* Pylint checks, make sure the import only happens once

* Added support for unloading, small fixes

* Check in the hassfest output files

* Flake8 fixes

* pylint mistake after flake8 fixes

* Work on comments

* Abort the import if it is already imported

* More comments resolved

* Added testcases for velbus config flow

* Fix pylint and flake8

* Added connection test to the config flow

* More sugestions

* renamed the abort reason

* excluded all but the config_flow.py from the velbus component in coveragerc

* Rewrote testcases with a patched version of _test_connection

* Docstyle fixes

* Updated the velbus testcases

* just yield

* flake8 fixes
2019-07-29 09:21:26 +02:00
MJJ
14c3b38461 Update to buienradar json api; and additional monitored_conditions (#24463)
* Update to json api; and additional sensors

* remove unneeded coordinate rounding

* minor optimizations

* Update CODEOWNERS

* Update sensor.py

unit conversion for:
- windgust (ms to km/h)
- windspeed (m/s to km/h)
- windspeed_1d (ms/km/h)
- visibility (m to km)

* Update weather.py

unit conversion for windspeed (m/s to km/h)

* Update sensor.py

* Update weather.py

* Update weather.py

* Update CODEOWNERS

* Update manifest.json

* Update CODEOWNERS

* Update CODEOWNERS

yet another try to get CODEOWNERS accepted...

* update codeowners

* update codeowners

* update

* updated codeowners to match manifest
2019-07-28 22:08:20 +02:00
Bram Goolaerts
0fc2813177 Add De Lijn (Flemish Public Transport) component (#24265)
* Initial commit of De Lijn (Flemish Public Transport) component

* Code corrections as per HA dev's requests

* changes to variable naming, setting attribution and states, plus some smaller optimizations

* Overlooked some linting issues, these are now fixed

* Updated pydelijn version requirement to 0.5.1 so UTC timestamps can be used instead of relative/local times.
Removed unused definition

* Updated pydelijn version requirement to 0.5.1 in requirements_all.txt

* Update the self._attributes dict directly instead of replacing it
Assign ATTRIBUTION while creating the _attributes dict
Remove the ATTRIBUTION assignment in device_state_attributes as it's updated in the async_update now.

* Linting issue (lenght of 2 lines) solved

* Removed a relative time attribute
Updated a linting issue in the LOGGER (used % instead of the format)
2019-07-26 16:41:02 +02:00
Kim Frellsen
f5d0f36caf Add new device tracker supporting Fortinet FortiGate (#23078)
* Create device_tracker.py

initial version

* Update device_tracker.py

set verify SSL to false as default. Normally users do not have a verified certificate at home

* Update device_tracker.py

pep8 compliant

* Update device_tracker.py

upgraded fortiosapi requirements

* Create __init__.py

* tox compliant

* Update device_tracker.py

* Create manifest.json

* Update .coveragerc

added fortios

* Update device_tracker.py

circle ci, blank line required

* Update manifest.json

removed code owners

* Update manifest.json

removed dependencies

* Update manifest.json

removed codeowners

* Update requirements_all.txt

added fortios

* Update requirements_all.txt

* Update device_tracker.py

pylint corrections

* Update device_tracker.py

pylint exceptions

* Update device_tracker.py

disable pylint broad exceptions

* Update device_tracker.py

pylint

* Update device_tracker.py

removed pointless string statements

* Update device_tracker.py

removed blank line

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update device_tracker.py

* Update manifest.json

added codeowners

* Update CODEOWNERS

added kimfrellsen as codeowner

* fortiosapi 0.10.8

Updated to use latest version of fortiosapi 0.10.8

* Update requirements_all.txt

updated fortiosapi to 0.10.8

* Update device_tracker.py

fixed some requests.

* Update device_tracker.py

better exception handling.

* Update device_tracker.py

exception handling

* Update CODEOWNERS

* Update device_tracker.py

corrected exception handling

* Update device_tracker.py

exception handling.

* Update device_tracker.py

lint corrections

* Update device_tracker.py

removed broad exception.

* Update device_tracker.py

fix lint errors

* Update device_tracker.py

minor changes, mostly cosmetic
2019-07-24 01:18:58 +02:00
Farid
4fb1937f65 Suez water (#23844)
* Add suez water sensor

* flake8 test

* pylint test

* edition to fix flake8 and pylint issues

* edition to be okay with the musts

* Added a blank line to __init.py__ for flake8

* added blank line for flake8

* changer scan interval from 10 to 720 minutes

* use of pysuez

* bug fix and isort

* use of pysuez

* fixed flake8 and pylint errors

* update requirements_all.txt

* added a method to test login/password befire adding device

* flake8 edition

* update requirements_all.txt

* add of .coveragerc file with untested files

* update of .coveragerc

* Update homeassistant/components/suez_water/__init__.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Update homeassistant/components/suez_water/sensor.py

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* bug fix in check credentials

* flake8 and pylint fixes

* fix codeowner

* update requirements_all.txt

* Sorted suez_water line

* edition to answer comments from @MartinHjelmare on #23844

* Attribute keys formatting to lowercase snakecase, name and icon constants returned directly, and remove of  attribute. Update of .

* pylint edition

* correction wrong keys in client attributes

* remove of unnedeed return and move add_entities
2019-07-24 01:14:41 +02:00
Sören
4c067ecff7 Add Elgato Avea integration (#24281)
* Adds Elgato Avea integration

* Revert "Adds Elgato Avea integration"

This reverts commit 8607a685eb.

* Adds Elgato Avea integration

* Removed debug

* Improved readability

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Adds Elgato Avea integration

* Fixes for flake8

* More Fixes for flake8

* Hopefully last fixes for flake8

* Unnecessary rounding and typo removed

* Duplicate calls removed

* raise PlatformNotReady if communication with bulb failes

* Fixes: flake8, missing import of exception and better handling of ble problems

* Update requirements_all.txt

Add requirements_all.txt file

* Revert "Update requirements_all.txt"

This reverts commit 2856025ed3.

* Update requirements_all.txt

* conform with snake_case naming style

https://circleci.com/gh/home-assistant/home-assistant/31823

* Fixed variable rename

* Unnecessary calculation removed

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Better Exception Handling

* Changed position of import, renamed add_entities to add_devices, remove unnecessary comment

* Unnecessary comments removed.
2019-07-24 01:02:00 +02:00
Joe Trabulsy
a8ec826ef7 Add Support for VeSync Devices - Outlets and Switches (#24953)
* Change dependency to pyvesync-v2 for vesync switch

* async vesync component

* FInish data_entry_flow

* Update config flow

* strings.json

* Minor fix

* Syntax fix

* Minor Fixs

* UI Fix

* Minor Correct

* Debug lines

* fix device dictionaries

* Light switch fix

* Cleanup

* pylint fixes

* Hassfest and setup scripts

* Flake8 fixes

* Add vesync light platform

* Fix typo

* Update Devices Service

* Fix update devices service

* Add initial test

* Add Config Flow Tests

* Remove Extra Platforms

* Fix requirements

* Update pypi package

* Add login to config_flow

Avoid setting up component if login credentials are invalid

* Fix variable import

* Update config_flow.py

* Update config_flow.py

* Put VS object into hass.data instead of config entry

* Update __init__.py

* Handle Login Error

* Fix invalid login error

* Fix typo

* Remove line

* PEP fixes

* Fix change requests

* Fix typo

* Update __init__.py

* Update switch.py

* Flake8 fix

* Update test requirements

* Fix permission

* Address change requests

* Address change requests

* Fix device discovery indent, add MockConfigEntry

* Fix vesynclightswitch classs

* Remove active time attribute

* Remove time_zone, grammar check
2019-07-23 23:40:55 +02:00
Greg
3fd138bbdd Add support for Rainforest Eagle-200 (#24919)
* Add support for Rainforest Eagle-200

* Removed direct access selector to monitored conditions

* Refactored code to use throttle on the update function

* Fixed issue in new code to use only one EagleReader instance

* Resolve comments

* Resolved comments

* Resolved comments and added Debug statement

* Added return statements

* Fixed typo

* Resolved comments and added debug statements

* Moved get_status method into Data object and decorated it with @staticmethod

* Resolved comments
2019-07-18 23:37:26 +02:00
Teemu R
70cab201db Add myself to songpal codeowners (#25221) 2019-07-18 08:05:17 +02:00
Thomas Le Gentil
3d3dd05789 Add Fortigate integration (#24908)
* Add Fortigate integration

* added feedback changes

* removed the only case

* fixed a description

* removed the CONFIG_PLATFORM

* deleted README

* added return from setup

* added return from setup

* fixed reviews

* Link updated

* Rename var and a couple of other minor changes

* Typos
2019-07-16 11:15:59 +02:00
Franck Nijhof
9d4b5ee58d Add Twente Milieu integration (#25129)
* Adds Twente Milieu integration

* Addresses flake8 warnings

* Adds required test deps

* Fixes path typo in coveragerc

* dispatcher_send -> async_dispatcher_send

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Removes not needed __init__

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Remove explicitly setting None default value on get call

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Correct typo in comment

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Clean storage for only the unloaded entry

Signed-off-by: Franck Nijhof <frenck@addons.community>

* asyncio.wait on updating all integrations

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Use string formatting

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Set a more sane SCAN_INTERVAL

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small refactor around services

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Small styling correction

* Extract update logic into own function

Signed-off-by: Franck Nijhof <frenck@addons.community>

* Addresses flake8 warnings
2019-07-14 12:30:23 +02:00
Aaron Bach
69cc6affd5 Add support for recording history to Apache Kafka (#25085)
* Add support for Apache Kafka

* Simplified

* Revert "Simplified"

This reverts commit fde4624e07.

* Revert "Revert "Simplified""

This reverts commit 5ae57e64c2.

* Completed

* Updated requirements

* Updated .coveragerc

* Removed unused import

* Updated codeowner
2019-07-12 13:13:51 +02:00
Aaron Bach
9ccb85d959
Add support for World Wide Lightning Location Network (#25001)
* Add support for World Wide Lightning Location Network

* Updated .coveragerc

* Added test

* Updated requirements

* Fixed tests

* Use local time for nearest strike

* Base geo location in place

* Finished geolocation work

* Fixed tests

* Cleanup

* Removed no-longer-needed method

* Updated requirements

* Add support for window and attrs

* Add strike ID to entity name

* Member comments
2019-07-10 16:40:11 -06:00
cdce8p
98ba015f06 Remove myself as codeowner (#25043) 2019-07-10 08:36:17 -07:00
Aaron Bach
c2e843cbc3 Add support for Notion Home Monitoring (#24634)
* Add support for Notion Home Monitoring

* Updated coverage

* Removed auto-generated translations

* Stale docstrings

* Corrected hardware version

* Fixed binary sensor representation

* Cleanup and update protection

* Updated log message

* Cleaned up is_on

* Updated docstring

* Modified which data is updated during async_update

* Added more checks during update

* More cleanup

* Fixed unhandled exception

* Owner-requested changes (round 1)

* Fixed incorrect scan interval retrieval

* Ugh

* Removed unnecessary import

* Simplified everything via dict lookups

* Ensure bridges are properly registered

* Fixed tests

* Added catch for invalid credentials

* Ensure bridge ID is updated as necessary

* Updated method name

* Simplified bridge update

* Add support for updating bridge via_device_id

* Device update guard clause

* Removed excess whitespace

* Whitespace

* Owner comments

* Member comments
2019-07-09 10:29:06 +02:00
Joakim Plate
ab832cda71 Add support for arcam fmj receivers (#24621)
* Add arcam_fmj support

* Just use use state in player avoid direct client access

* Avoid leaking exceptions on invalid data

* Fix return value for volume in case of 0

* Mark component as having no coverage

* Add new requirement

* Add myself as maintainer

* Correct linting errors

* Use async_create_task instead of async_add_job

* Use new style string format instead of concat

* Don't call init of base class without init

* Annotate callbacks with @callback

Otherwise they won't be called in loop

* Reduce log level to debug

* Use async_timeout instead of wait_for

* Bump to version of arcam_fmj supporting 3.5

* Fix extra spaces

* Drop somewhat flaky unique_id

* Un-blackify ident to satisy pylint

* Un-blackify ident to satisy pylint

* Move default name calculation to config validation

* Add test folder

* Drop unused code

* Add tests for config flow import
2019-07-08 17:14:19 +02:00
Dave T
6e24b52a7e Add support for aurora ABB Powerone solar photovoltaic inverter (#24809)
* Add support for aurora ABB Powerone solar photovoltaic inverter

* Add support for aurora ABB Powerone solar photovoltaic inverter

* Update stale docstring

* Fixed whitespace lint errors

* Remove test code

* Delete README.md

Website documentation contains setup instructions.  README not needed here.

* Only close the serial line once.

* Correct newlines between imports

* Change add_devices to add_entites and remove unnecessary logging.

* Use new style string formatting instead of concatenation

* Directly access variables rather than via config.get

* Update sensor.py
2019-07-07 11:22:21 +02:00
Niels Mündler
333e1d6789 Fronius (solar energy and inverter) component (#22316)
* Introduced fronius component that adds ability to track Fronius devices from Home Assistant

* Use device parameter for fetching inverter data

* Fixed handling of default scope

* Handle exceptions from yield

* Fulfill PR requirements

* Fixed houndci violations

* Found the last hound violation

* Fixed docstring (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776934)

* Fixed import order with isort (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165776957)

* CONF_DEVICE is now CONF_DEVICEID (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777161)

* Added docstring to class FroniusSensor (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777792)

* Fixed docstring for state (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165777885)

* Added/fixed docstrings (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778108 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165778125)

* Remove redundant log entry (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779213)

* Fixed error message if sensor update fails (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779435)

* Fixed error log messages (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779751 & https://github.com/home-assistant/home-assistant/pull/11446#discussion_r165779761)

* Satisfy hound

* Handle exceptions explicit (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940902)

* Removed unnecessary call of update (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168940894)

* The point makes the difference.

* Removed unrelated requirements

* Remove config logging (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968748)

* Reorder and fix imports (https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968725, https://github.com/home-assistant/home-assistant/pull/11446#discussion_r168968691)

* Update fronius requirement

* Various small fixes

* Small fixes

* Formatting

* Add fronius to coverage

* New structure and formatting

* Add manifest.json

* Fix data loading

* Make pylint happy

* Fix issues

* Fix parse_attributes

* Fix docstring and platform schema

* Make use of default HA-Const config values

* Change configuration setup, introducing list of monitored conditions

* Change the structure slightly, allowing for a list of sensors

* Remove periods from logging

* Formatting

* Change name generation, use variable instead of string

* small fixes

* Update sensor.py

* Incorporate correction proposals

* Setting default device inside validation

* Move import on top and small format

* Formatting fix

* Rename validation method to _device_id_validator
2019-06-28 20:48:52 -07:00
endor
98ba529ead Add Trafikverket train component (#23470)
* Added Trafikverket train component

* Updated manifest with proper name and codeowner

* Updated requirements and manifest

* Updated CODEOWNERS

* Corrected requirements

* Added trafikverket_train/sensor.py to .coveragerc

* Added error handling and log if API call fails

* Corrected styles, removed dev log, improved validation

* Method calls to async_update(), improved error handling

* Minor cleanup/reorg for effeciency

* Added station cache and corrected to fit standards

* Simplified trainstop id  and cleaned up dict.get

* Corrected mistake after change from dict to array

* Change device class to timestamp
2019-06-24 10:38:50 +02:00
Paulus Schoutsen
c296e9b9bb Update owner stream integration 2019-06-23 12:00:06 -07:00
Rodrigo Pérez
d468d0f71b Vlc telnet (#24290)
* Vlc telnet first commit

First functional version, remains to add more functionality.

* New functions added and bugfixes

* Compliance with dev checklist

* Compliance with dev checklist

* Compliance with pydocstyle

* Removed unused import

* Fixed wrong reference for exception

* Module renamed

* Fixed module rename in other

* Fixed wrong reference for exception


Module renamed


Fixed module rename in other

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update homeassistant/components/vlc_telnet/media_player.py

Accepted suggestion by @OttoWinter

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Suggestions by @OttoWinter

+Manage error when the VLC dissapears to show status unavailable.

* Removed error log, instead set unavailable state

* Changes suggested by @pvizeli

-Import location
-Use of constants

* Implemented available method

* Improved available method
2019-06-21 11:13:47 +02:00
mvn23
43a6be6471 Multiple devices support for opentherm_gw (#22932)
* Breaking change: Rewrite opentherm_gw to add support for more than one OpenTherm Gateway.
Breaks config layout and child entity ids and adds a required parameter to all service calls (gateway_id).

* Add schema and parameter description for service opentherm_gw.reset_gateway.

* Add optional name attribute in config to be used for friendly names.
Fix bugs in binary_sensor and climate platforms.

* pylint fixes

* Remove unused variables.

* Update manifest.json, remove REQUIREMENTS from .py file

* Update CODEOWNERS

* Address issues that were brought up (requested changes):
- Move imports to module level
- Change certain functions from async to sync
- Move constants to const.py (new file)
- Call gateway setup from outside of __init__()
- Move validation of monitored_variables to config schema

* Address requested changes:
- Make module imports relative
- Move more functions from async to sync, decorate with @callback where necessary
- Remove monitored_variables option, add all sensors by default
2019-06-21 10:52:25 +02:00
majuss
14752baf27 Added ELV PCA 301 smart emeter switch (#23300)
* added pca

* removed req from py

* try to fix codeowners

* redo req

* ran codeowners

* processed comments

* fix style

* fix style

* fix style

* Set availalbe to False when communication fails.
2019-06-19 15:41:43 -07:00