Commit Graph

1325 Commits

Author SHA1 Message Date
Eugenio Panadero bb68e7a532
Bump aiohue version to 2.1.0 (#33234) 2020-03-25 09:11:00 -07:00
Ron Klinkien 109f083c5d
Add Body Composition data to Garmin Connect (#32841)
* Added support for Garmin index smart scale

* Added body composition data

* Added keyerror exception

* Code optimization

* Update library, changed logger errors to exception

* Fixed manifest
2020-03-24 10:29:40 -07:00
Oliver 9226589bcd
Bump to version 0.8.1 of denonavr (#33169)
* Bump to version 0.8.1 of denonavr

* Update CODEWONERS file
2020-03-24 13:03:22 +01:00
Pascal Vizeli e616ab5fb2
Bump OZW fork to 0.1.10 (#33205) 2020-03-24 12:04:33 +01:00
elmurato 45241e57ca
Add support for Minecraft SRV records (#32372)
* Added support for Minecraft SRV records

* Switched from dnspython to aiodns, improved server ping and log messages, use address instead of host and port in config flow

* Updated component requirements
2020-03-23 16:51:13 -07:00
Olivier B 4332cbe112
Add Tesla sentry mode switch (#32938)
* Add Tesla sentry mode switch

* add available property, fix is_on

* bump teslajsonpy to 0.6.0
2020-03-23 10:52:59 +01:00
J. Nick Koston f9a7c64106
Config flow for doorbird (#33165)
* Config flow for doorbird

* Discoverable via zeroconf

* Fix zeroconf test

* add missing return

* Add a test for legacy over ride url (will go away when refactored to cloud hooks)

* Update homeassistant/components/doorbird/__init__.py

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

* without getting the hooks its not so useful

* Update homeassistant/components/doorbird/config_flow.py

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

* fix copy pasta

* remove identifiers since its in connections

* self review fixes

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-23 10:14:21 +01:00
Quentame 0249daef2e
Bump iCloud to 0.9.6.1 (#33161) 2020-03-22 21:05:27 +01:00
Eugenio Panadero 8d2e72cdf6
Add pvpc electricity prices integration (#32092)
* Add new integration: pvpc_hourly_pricing

to add a sensor with the current hourly price of electricity in Spain.
Configuration is done by selecting one of the 3 reference tariffs, with
1, 2, or 3 billing periods.

* Features config flow, entity registry, RestoreEntity, options flow
  to change tariff, manual yaml config as integration or sensor platform
* Cloud polling sensor with minimal API calls (3/hour at random times)
  and smart retry; fully async
* Only 1 state change / hour (only when the price changes)
* At evening, try to download published tomorrow prices, to always store
  prices info for a window of [3, 27] hours in the future.
* Include useful state attributes to program automations to be run
  at best electric prices.
* Add spanish and english translations.

* Requires `xmltodict` to parse official xml file with hourly prices
for each day.

* Update requirements and add to codeowners

* Avoid passing in hass as a parameter to the entity

Instead, create time change listeners in async_added_to_hass and
call async_generate_entity_id before async_add_entities

* Fix lint issues

* Add tests for config & options flow

* Add tests for manual yaml config

with entity definition as integration and also as a sensor platform

* Fix placement of PLATFORM_SCHEMA and update generated config_flows

* Store prices internally linked to UTC timestamps

- to deal with days with DST changes
- and work with different local timezones

* Add availability to sensor

to 'expire' the sensor if there is no connection available
 and current hour is not in the stored prices.

Also, turn off logging and retrying if prices can't be downloaded
repeatedly, by flagging `data_source_available` as False, so there is no
log-flood mess.

* Add more tests

- to cover behavior in DST changes and complete coverage of sensor logic
- to cover abort config flow

* fix linter

* Better handling of sensor availability and minor enhancements

- Emmit 1 error if data source is marked as unavailable
  (after some retries), and be silent until cloud access is recovered,
  then emmit 1 warning.
- Follow standard of camel_case keys in attributes

* Mock aiosession to not access real API, store fixture data

- Store a set of daily xml files to test sensor logic for all situations
- Mock time and session to run tests with stored API responses
- Add availability test to simulate a lost + recovery of cloud access,
  checking that logging is reasonable: 1 error to flag the continued
  disconnection + 1 warning in recovery.

* Change API endpoint to retrieve JSON data

and remove xmltodict from reqs.

It seems that this endpoint is more reliable than the XML.

* Adapt tests to new API endpoint

* Translate tariff labels to plain English

and sync the default timeout value for all ways of configuration.

* Relax logging levels to meet silver requirements

- 1 warning when becoming unavailable, another warning when recovered.
- Warnings for unexpected TimeoutError or ClientError
- Move the rest to debug level, leaving info for HA internals

Also reduce number of API calls from 3 to 2 calls/hour.

* Fix requirements

* Mod tests to work with timezone Atlantic/Canary

and fix state attributes for timezones != reference, by using 3 price
prefixes: 'price_last_day_XXh', 'price_next_day_XXh' and 'price_XXh',
all generated with local time (backend timezone)

* Try to fix CI tests

* Externalize pvpc data and simplify sensor.py

* add new `aiopvpc` to requirements
* Remove data parsing and price logic from here
* Replace some constant properties with class variables

* Simplify tests for pvpc_hourly_pricing

* Fix updater for options flow

* Updater always reloads
* `tariff` value comes 1st from entry.options, 2nd from entry.data

* Fix lint

* Bump aiopvpc

* Remove options flow and platform setup

- Remove PLATFORM_SCHEMA and async_setup_platform
- Generate config_entry.unique_id with tariff instead of entity_id, in flow step.
- Remove TariffSelectorConfigFlow
- Adapt tests to maintain full coverage

* Fix docstring on test

and rename SENSOR_SCHEMA to SINGLE_SENSOR_SCHEMA to avoid confusion

* Remove timeout manual config, fix entry.options usage, simplify unique_id

* Simplify tests

- No need for a test_setup now, as platform setup is removed and integration
  setup is already used in `test_availability`
- Simplified `_process_time_step`: only one async_fire(EVENT_TIME_CHANGED)/hour

* Fix possible duplicated update

when source is not available.

* Do not access State last_changed for log messages

* Do not update until entity is added to hass

and call to async_update after 1st download or when recovering access, so
async_write_ha_state is not called twice on those.

* minor changes

* Rename method to select current price and make it a callback
2020-03-22 14:25:31 -05:00
Maciej Bieniek 9d87c1ab1a
Bump gios to 0.0.4 (#33141) 2020-03-22 13:44:57 +01:00
jjlawren 99877c32b1
Bump pyecobee to 0.2.3 (#33130) 2020-03-22 13:19:26 +01:00
guillempages 99d732b974
Revert "Validate UUID for tankerkoenig (#32805)" (#33123)
This reverts commit 49c2a4a4e3.
The validation was causing more problems than it was fixing, so removed
it completely
2020-03-21 17:48:18 -07:00
Aaron Bach 403b4a2e0b
Bump simplisafe-python to 9.0.5 (#33116) 2020-03-21 16:01:39 -06:00
Anders Melchiorsen 699ca44260
Clean up Sonos attributes for radio streams (#33063) 2020-03-21 12:17:00 -07:00
Franck Nijhof a7b08c48f3
Upgrade spotipy to 2.10.0 (#33083) 2020-03-21 19:25:29 +01:00
Balazs Sandor e18bea0215
bump version zigpy-cc (#33097) 2020-03-21 10:43:55 -04:00
guillempages 49c2a4a4e3
Validate UUID for tankerkoenig (#32805)
* Validate UUIDs against custom validator

Instead of just validating against strings, use a custom validator,
so that the format can be checked.

* Add tests for custom UUID4 validator
2020-03-21 09:43:12 -05:00
J. Nick Koston 85328399e0
Add support for nexia automations (#33049)
* Add support for nexia automations

Bump nexia to 0.7.1

Start adding tests

Fix some of the climate attributes that were wrong (discovered while adding tests)

Pass the name of the instance so the nexia UI does not display "My Mobile"

* fix mocking

* faster asserts, scene

* scene makes so much more sense

* pylint

* Update homeassistant/components/nexia/scene.py

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

* docstring cleanup

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-20 18:49:42 -05:00
Aaron Bach 836413a4a8
Bump simplisafe-python to 9.0.4 (#33059) 2020-03-20 14:59:01 -06:00
Knapoc c2ac8e813a
Bump aioasuswrt to 1.2.3 and fix asuswrt sensor (#33064)
* Bump aioasuswrt to 1.2.3

* Fix asuswrt connection setup parameters

* fix typo
2020-03-20 21:34:17 +01:00
J. Nick Koston 37687561c0
Add config flow for myq (#32890)
* Add a config flow for myq

* Discovered by homekit

* Fix gates being treated as garage doors

* Offline devices now show as unavailable

* Homekit flow

* strip out icon

* return -> raise
2020-03-20 15:28:14 -05:00
Steven Rollason ecbcdee934
Bump pyhaversion to 3.3.0 (#33044) 2020-03-20 15:58:23 +01:00
J. Nick Koston f275b7e5ed
Add Nexia thermostat support (Trane / American Standard) (#32826)
* Merge nexia

* Restore original work

* Merge cleanups

* config flow

* Add config flow

* Add missing files

* Fix import of old yaml config

* More cleanups from self review

* Additional self review

* Update homeassistant/components/nexia/services.yaml

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

* fix io in event loop

* Update homeassistant/components/nexia/climate.py

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

* avoid using ternary statements if they span multiple

* Cleanup strings and remove unneeded attributes

* more cleanup

* more cleanup of yaml

* remove coordinator boiler plate

* nuke services for now for the inital pr, add back later

* remove copy pasta

* this can be reduced more

* Update homeassistant/components/nexia/config_flow.py

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

* Update homeassistant/components/nexia/config_flow.py

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

* Update homeassistant/components/nexia/__init__.py

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

* Update homeassistant/components/nexia/__init__.py

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

* Update homeassistant/components/nexia/__init__.py

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

* Update homeassistant/components/nexia/__init__.py

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

* review

* comments

* Update homeassistant/components/nexia/climate.py

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

* Update homeassistant/components/nexia/climate.py

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

* Update homeassistant/components/nexia/climate.py

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

* more review adjustments

* nuke unused constants

* Update homeassistant/components/nexia/config_flow.py

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

* map states

* add update

* zone id is unique

* Fix humidfy check

* target_humidity should be a property instead of in attributes

* remove aux heat as its already there

Co-authored-by: Ryan Nazaretian <ryannazaretian@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-19 21:03:51 -05:00
Jc2k 84712d2f40
Bump aiohomekit to fix Insignia NS-CH1XGO8 and Lennox S30 (#33014) 2020-03-19 16:25:18 -07:00
Aaron Bach 23045af4a7
Bump simplisafe-python to 9.0.3 (#33013) 2020-03-19 16:39:24 -06:00
Robin 9451920ab5
Fix sighthound dependency issue (#33010) 2020-03-19 20:34:15 +01:00
Balazs Sandor 62f2ee5f60
Bump version of zigpy-cc to 0.2.3 (#32951) 2020-03-19 11:42:49 -05:00
J. Nick Koston d33a3ca90f
Config flow for harmony (#32919)
* Config flow for harmony

* Fixes unique ids when using XMPP

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

* Find the unique id for the config flow

* move shutdown to init

* Add test for ssdp (still failing)

* Fix ssdp test

* Add harmony to MIGRATED_SERVICE_HANDLERS (this is a breaking change)

* more cleanups

* use unique id for the config file

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-03-19 11:29:51 -05:00
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
Maikel Punie 03c906a2f1
Fix velbus in the 107 release (#32936)
velbus 2.0.41 introduced some data files in the python module. They are not copied when installing the velbus module. 2.0.43 fixes this problem
2020-03-19 01:56:32 -05:00
Bram Kragten ede0cfaeb8
Updated frontend to 20200318.1 (#32957) 2020-03-18 17:13:19 -07:00
Jc2k 7c79adad8f
Refactor and simplify homekit_controller entity setup (#32927) 2020-03-18 10:12:55 -05:00
Bram Kragten 7d23a734fc
Updated frontend to 20200318.0 (#32931) 2020-03-18 13:02:27 +01:00
Franck Nijhof aece76f6cd
Bump wled 0.3.0, reduce calls stability improvements (#32903) 2020-03-17 20:17:59 +01:00
Paulus Schoutsen ff582721dd
Bump cast to 4.2.0 (#32906) 2020-03-17 10:30:56 -07:00
Quentame 4c32fd12fc
Bump iCloud to 0.9.5 (#32901) 2020-03-17 17:46:30 +01:00
Bram Kragten 682fcec99e
Updated frontend to 20200316.1 (#32878) 2020-03-16 14:27:20 -07:00
David F. Mulcahey 41cd3ba532
Bump ZHA quirks to 0.0.37 (#32867) 2020-03-16 15:29:14 -04:00
Bram Kragten f4b3760a1a
Updated frontend to 20200316.0 (#32866) 2020-03-16 13:30:59 +01:00
Maciej Bieniek b9ad40ed38
Bump brother to 0.1.9 (#32861) 2020-03-16 12:00:39 +01:00
Pascal Vizeli 451c6c25cd
Update pyozw 0.1.9 (#32864) 2020-03-16 11:40:21 +01:00
Chris Talkington cf8dfdae47
Add config flow to roku (#31988)
* create a dedicated const.py

* add DEFAULT_PORT to const.py

* work on config flow conversion.

* remove discovery.

* work on config flow and add tests. other cleanup.

* work on config flow and add tests. other cleanup.

* add quality scale to manifest.

* work on config flow and add tests. other cleanup.

* review tweaks.

* Update manifest.json

* catch more specific errors

* catch more errors.

* impprt specific exceptions

* import specific exceptions

* Update __init__.py

* Update config_flow.py

* Update media_player.py

* Update remote.py

* Update media_player.py

* Update remote.py

* Update media_player.py

* Update remote.py

* Update config_flow.py

* Update config_flow.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update remote.py

* Update test_init.py

* Update test_init.py

* Update media_player.py

* Update media_player.py

* Update media_player.py
2020-03-15 21:13:04 -07:00
Alan Tse 6e95b90f42
Bump teslajsonpy to 0.5.1 (#32827) 2020-03-15 20:42:07 -07:00
Jc2k 6affb27711
Fix homekit_controller beta connectivity issues (#32810) 2020-03-14 23:34:29 +01:00
Ville Skyttä d04479044c
Upgrade huawei-lte-api to 1.4.11 (#32791)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.11
2020-03-14 11:37:44 +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
Bram Kragten 460857a765
Updated frontend to 20200313.0 (#32777) 2020-03-13 13:43:39 -07:00
J. Nick Koston e2a113a2de
Bump py-august to 0.25.0 (#32769)
Fixes a bug in the conversion to async where code validation failed.
2020-03-13 18:07:53 +01:00
Franck Nijhof 11a25157c1
Upgrade sqlalchemy to 1.3.15 (#32747) 2020-03-13 00:28:26 +01:00
Bram Kragten a3dd9979d2
Updated frontend to 20200312.0 (#32741) 2020-03-12 14:41:04 -07:00