Commit Graph

292 Commits (9b2107b71f8dc5eac6718c145c64acab342e5a06)

Author SHA1 Message Date
cgtobi 31dbdff3c4
Add Netatmo data handler (#35571)
* Fix webhook registration

* Only load camera platform with valid scope

* Add initial data handler and netatmo base class

* Update camera to use data handler

* Update init

* Parallelize API calls

* Remove cruft

* Minor tweaks

* Refactor data handler

* Update climate to use data handler

* Fix pylint error

* Fix climate update not getting fresh data

* Update climate data

* update to pyatmo 4.0.0

* Refactor for pyatmo 4.0.0

* Exclude from coverage until tests are written

* Fix typo

* Reduce parallel calls

* Add heating request attr

* Async get_entities

* Undo parallel updates

* Fix camera issue

* Introduce individual scan interval per device class

* Some cleanup

* Add basic webhook support for climate to improve responsiveness

* Replace ClimateDevice by ClimateEntity

* Add support for turning camera on/off

* Update camera state upon webhook events

* Guard data class registration with lock

* Capture errors

* Add light platform

* Add dis-/connect handling

* Fix set schedule service

* Remove extra calls

* Add service to set person(s) home/away

* Add service descriptions

* Improve service descriptions

* Use LightEntity instead of Light

* Add guard if no data is retrieved

* Make services entity based

* Only raise platform not ready if there is a NOC

* Register webhook even during runtime

* Fix turning off event

* Fix linter error

* Fix linter error

* Exclude light platform from coverage

* Change log level

* Refactor public weather sensor to use data handler

* Prevent too short coordinates

* Ignore modules without _id

* Code cleanup

* Fix test

* Exit early if no home data is retrieved

* Prevent discovery if already active

* Add services to (un-)register webhook

* Fix tests

* Not actually a coroutine

* Move methods to base class

* Address pylint comment

* Address pylint complaints

* Address comments

* Address more comments

* Add docstring

* Use single instance allowed

* Extract method

* Remove cruft

* Write state directly

* Fix test

* Add file to coverage

* Move nested function

* Move nested function

* Update docstring

* Clean up code

* Fix webhook bug

* Clean up listeners

* Use deque

* Clean up prints

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/netatmo/camera.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Rename data_class variable

* Break when match

* Extract method

* Extract methods

* Rename variable

* Improve comment

* Some refinements

* Extra

* Extract method

* Simplify code

* Improve reability

* Code simplification

* Simplify code

* Simplify code

* Code cleanup

* Fix import

* Clean up

* Clean up magic strings

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with HOMEDATA_DATA_CLASS_NAME

* Replace data_class_name in public weather sensor

* Clean up

* Remove deprecated config options

* Schedule immediate update on camera reconnect

* Use UUID to clearly identify public weather areas

* Use subscription mode

* Move clean up of temporary data classes

* Delay data class removal

* Fix linter complaints

* Adjust test

* Only setup lights if webhook are registered

* Prevent crash with old config entries

* Don't cache home ids

* Remove stale code

* Fix coordinates if entered mixed up by the user

* Move nested function

* Add test case for swapped coordinates

* Only wait for discovery entries

* Only use what I need

* Bring stuff closer to where it's used

* Auto clean up setup data classes

* Code cleanup

* Remove unneccessary lock

* Update homeassistant/components/netatmo/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update tests/components/netatmo/test_config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Clean up dead code

* Fix formating

* Extend coverage

* Extend coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-04 20:46:46 +02:00
HomeAssistant Azure 4bd9509fa7 [ci skip] Translation update 2020-07-31 00:02:40 +00:00
HomeAssistant Azure a1ebb52813 [ci skip] Translation update 2020-07-25 00:04:22 +00:00
HomeAssistant Azure 15fe727f2c [ci skip] Translation update 2020-07-23 00:02:48 +00:00
HomeAssistant Azure e766a119d2 [ci skip] Translation update 2020-07-22 00:02:30 +00:00
HomeAssistant Azure 83d4e5bbb7 [ci skip] Translation update 2020-07-21 00:03:00 +00:00
HomeAssistant Azure 72309a0dfc [ci skip] Translation update 2020-07-18 00:02:49 +00:00
cgtobi baa7bb69b3
Fix unavailable when value is zero (#37918) 2020-07-17 00:28:49 +02:00
HomeAssistant Azure e852a2eb9b [ci skip] Translation update 2020-07-15 00:02:40 +00:00
Bram Kragten 9ecaa10e51
Adjust icons for MDI bump (#37730) 2020-07-14 22:17:14 +02:00
HomeAssistant Azure aabf0dab88 [ci skip] Translation update 2020-07-14 00:03:03 +00:00
HomeAssistant Azure d3b47b6d89 [ci skip] Translation update 2020-07-13 00:02:52 +00:00
HomeAssistant Azure 2e72216a1c [ci skip] Translation update 2020-07-11 00:02:51 +00:00
HomeAssistant Azure 82739bac3b [ci skip] Translation update 2020-07-10 00:03:39 +00:00
cgtobi 155a5f7c26
Add back Netatmo public weather sensors (#34401)
* Add public weather sensors back in

* Remove stale code

* Cleanup after before adding entities

* Fix pylint complaint

* Add test for options flow

* Change mode to listbox

* Update .coveragerc

* Address comments

* Don't process empty list

* Address comment

* Fix mistake

* Make signal unique

* Make string more unique

* Fix merge conflict
2020-07-09 06:39:33 +02:00
HomeAssistant Azure 251a1d6619 [ci skip] Translation update 2020-07-09 00:05:04 +00:00
HomeAssistant Azure 6fd756299e [ci skip] Translation update 2020-07-08 00:02:43 +00:00
HomeAssistant Azure 0426b70046 [ci skip] Translation update 2020-07-07 00:17:49 +00:00
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
HomeAssistant Azure e48bcd2070 [ci skip] Translation update 2020-06-27 00:05:54 +00:00
HomeAssistant Azure b15caf31a9 [ci skip] Translation update 2020-06-15 00:03:32 +00:00
Paulus Schoutsen dd6d18102f Update translations 2020-06-11 10:13:42 -07:00
HomeAssistant Azure 492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
HomeAssistant Azure e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
HomeAssistant Azure 9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
cgtobi 8b9bd67da7
Bump pyatmo version to 3.3.1 (#35476) 2020-05-10 22:18:53 -07:00
Paulus Schoutsen 34e35f6aa3
Add config flow base strings (#34523) 2020-05-04 20:10:39 -07:00
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
HomeAssistant Azure 5d37eb8eeb [ci skip] Translation update 2020-04-30 00:03:17 +00:00
HomeAssistant Azure 90e0a1af8a [ci skip] Translation update 2020-04-26 00:02:45 +00:00
cgtobi d53cb951e7
Fix zero value state rendering sensor unavailable (#34694)
Co-Authored-By: Franck Nijhof <git@frenck.dev>
2020-04-25 22:15:31 +02:00
Erik Montnemery 29bc93ea98
Rename ClimateDevice to ClimateEntity (#34591) 2020-04-25 18:04:03 +02:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen 0d60d40512 Update translations 2020-04-16 13:00:10 -07:00
Paulus Schoutsen 55dfca7467
Drop title from translations if brand name (#34306) 2020-04-16 12:52:53 -07:00
Paulus Schoutsen f06aeea385 Update translations 2020-04-15 09:51:07 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
cgtobi 851c1711d4
Reduce log spam (#33592)
* Reduce log spam

* Reduce log spam

* Revert
2020-04-03 14:01:24 -07:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
cgtobi cd300f54a8
Add Home Coach to zeroconf detection (#33593) 2020-04-03 11:59:27 -07:00
cgtobi 23e091696e
Fix netatmo device unavailable and services (#33509)
* Handle unavailabe entities

* Remove some logging

* Set valve to lowest temp when turned off

* Remove some logging

* Address comments

* Report entity as connected if update is successful

* Fix stupidness

* Fix
2020-04-02 17:35:25 +02:00
HomeAssistant Azure 5bedc4ede2 [ci skip] Translation update 2020-03-29 00:04:45 +00:00
cgtobi eb77b94315
Fix netatmo webhook registration issue (#32994)
* Wait for cloud connection

* Just wait

* Remove redundant entry

* Drop webhook before unloading other platforms

* Add missing scope

* Update homeassistant/components/netatmo/__init__.py

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

* Fix test

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-20 15:22:27 +01:00
cgtobi 6ab14a3729
Fix discovery issue with netatmo climate devices (#33040) 2020-03-20 15:20:42 +01:00
Daniel Høyer Iversen f9634f0232
Add Netatmo Home Coach as model (#32829) 2020-03-15 12:41:19 +01:00
cgtobi 50c32d57f5
Remove Netatmo binary sensor (#32673)
* Clean up for access scope review

* Remove deleted from coverage omit list
2020-03-11 09:25:19 -07:00
cgtobi b9a9a92145
Refactor netatmo webhooks (#32195)
* Start webhook implementation

* Add webhook implementation

* Bump pyatmo 3.2.5

* Fire event after data evaluation

* Setup webhooks after components

* Fix logging

* Wrap non async call

* Wrap non async call

* Add smoke detector and door tag webhook support

* Catch when webhook registration fails

* Log to debug

* Fix persons lookup

* Add dependency

* Remove false requirements

* Fix requirements

* Replace netatmo events by a single one

* Slim down code

* Clean up code

* Address review vomments

* Undo attribute removal

* Bump pyatmo to v3.3.0

* Only create webhook id once and reuse

* Store and reuse cloudhook url

* Wait for hass core to be up and running

* Register webhook once HA is ready

* Delay webhook registration
2020-03-10 17:08:59 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Ville Skyttä 496bd3dddf
Add and use more unit constants (#32122)
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00
springstan a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
cgtobi 7e3841e172
Bump pyatmo to 3.2.4 (#32018)
* Bump pyatmo to 3.2.3

* Bump pyatmo version to 3.2.4

* Update requirements_test_all.txt
2020-02-20 08:25:49 -08:00
Ville Skyttä 3018e8ff47
Use time.monotonic instead of time.time where appropriate (#31780) 2020-02-13 22:57:07 +01:00
HomeAssistant Azure 40e866a5bb [ci skip] Translation update 2020-02-13 00:31:46 +00:00
cgtobi 891f13eefe
Fix missing device class in netatmo binary sensors (#31693)
* Bring back device class

* Add door tag sensors types

* Actually discover individual tags per camera
2020-02-11 18:02:13 -08:00
cgtobi 7d0b50cadb
Fix wrong error message in netatmo integration (#31690) 2020-02-10 12:33:07 +01:00
HomeAssistant Azure 5483de7e25 [ci skip] Translation update 2020-02-08 00:31:45 +00:00
Paulus Schoutsen d407b8e215
Deprecate old netatmo keys (#31544) 2020-02-06 09:26:51 -08:00
Franck Nijhof 7233048fea
Limit OAuth scopes for Netatmo and Home Assistant Cloud (#31538)
* Limit OAuth scopes for Netatmo and Home Assistant Cloud

* Fix tests by making order of scopes predictable
2020-02-06 17:00:27 +01:00
HomeAssistant Azure 6f99bac557 [ci skip] Translation update 2020-02-06 00:31:53 +00:00
HomeAssistant Azure 74413e07d0 [ci skip] Translation update 2020-01-31 00:31:57 +00:00
HomeAssistant Azure 2c02334c1f [ci skip] Translation update 2020-01-29 00:31:54 +00:00
HomeAssistant Azure 6daec557b4 [ci skip] Translation update 2020-01-28 00:31:59 +00:00
Franck Nijhof fb35d382e1
Remove all empty *_setup_platform() from integrations (#31025)
* Remove all empty *_setup_platform() from integrations

* Fix tests for smartthings

* Fix tests for heos
2020-01-21 12:38:38 +01:00
HomeAssistant Azure 692e4f27c4 [ci skip] Translation update 2020-01-21 00:33:20 +00:00
HomeAssistant Azure f20b3515f2 [ci skip] Translation update 2020-01-20 00:31:55 +00:00
cgtobi da368f0cb8 Update pyatmo to 3.2.2 and add available attribute (#30882)
* Update pyatmo to 3.2.1

* Update pyatmo to 3.2.2

* Remove accidentally added requirements

* Add availability property
2020-01-17 17:08:30 +01:00
HomeAssistant Azure 24a381456a [ci skip] Translation update 2020-01-17 00:31:45 +00:00
HomeAssistant Azure 8093da6a0c [ci skip] Translation update 2020-01-15 00:31:56 +00:00
HomeAssistant Azure f9fe91ee74 [ci skip] Translation update 2020-01-14 00:31:46 +00:00
HomeAssistant Azure 0534153ae7 [ci skip] Translation update 2020-01-13 00:31:54 +00:00
HomeAssistant Azure 8b46b5591f [ci skip] Translation update 2020-01-12 00:32:04 +00: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
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Ville Skyttä fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Bas Nijholt c54135486e use isort to sort imports according to PEP8 for netatmo (#29682) 2019-12-09 11:50:59 +01:00
1v0dev b8434fdcfd Add service to set netatmo home heating schedule (#29244)
* Add service to set netatmo home heating schedule.

* handle NoDevice exeption; add service argument constant
2019-12-06 17:45:27 +01:00
cgtobi 0bd01ba495 Fix manual config (#28956) 2019-11-23 11:00:26 +01:00
cgtobi 86e581b83d Fix missing Netatmo sensors (#28899)
* Update pyatmo to 3.0.1

* Improve sensor name

* Fix missing sensors

* Update pyatmo module

* Update pyatmo to 3.1.0

* Update requirements

* Fix method call
2019-11-21 17:35:03 +01:00
cgtobi 90c7d0e56a Update pyatmo to 3.0.1 (#28829) 2019-11-18 09:10:59 +01:00
cgtobi 4435b3a5c9 Fix issue with multiple Netatmo home coach devices (#28407)
* Retrieve more detailed module infos

* Switch to using IDs

* Bump pyatmo version to 2.3.3

* Update requirements

* Undo the change of the unique id

* Rename variable
2019-11-08 17:12:41 +01:00
ssenart 9ba3abd1b7 Add Netatmo camera services (#27970)
* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement turn_on and turn_off methods.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Netatmo camera : Implement enable_motion_detection(), disable_motion_detection() operations.

* Add Presence Netatmo Camera services (set_light_auto, set_light_on, set_light_off) to control its internal flood light status.

* Add Presence Netatmo Camera services (set_light_auto, set_light_on, set_light_off) to control its internal flood light status.

* Netatmo camera : Use new style string formatting.

* Make the file compliant with flake8 linter.

* Make the file compliant with flake8 linter.

* Make it compliant with black formatter.

* Make it compliant with black formatter.

* Bug fix : Flood light control was not working with VPN url.
2019-11-06 07:52:59 -05:00
Tom Robinson e91bb1ab08 Replace Netatmo CO2 sensor icon (#28520) 2019-11-04 09:56:36 +01:00
cgtobi 14d3b9b8f9 Bump pyatmo version to 2.3.2 (#27731)
* Bump pyatmo version to 2.3.2

* Add reachable attribute

* Add reachable attribute
2019-10-16 12:19:38 +02:00
Quentame 7718d61cd7 Move imports in netatmo component (#27360) 2019-10-10 00:22:10 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Franck Nijhof 9c9c921922 Use Python3 new super syntax sugar (#26890) 2019-09-24 15:38:20 -07:00
Franck Nijhof 1c5e0123c9 Use literal string interpolation in integrations N-Q (f-strings) (#26391) 2019-09-03 11:35:00 -07:00
cgtobi d89e8ead61
Fix Netatmo climate issue (#25830)
* Bump pyatmo to v2.2.1

* Fix issue 25778
2019-08-10 15:49:29 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi 4bef2412d2 Netatmo climate refactor (#25457)
* Refactor climate component to use home id rather than name

* Bump pyatmo version

* Add new exception

* Update pyatmo version
2019-07-31 11:13:12 -07:00
cgtobi ca989cba44 Bump pyatmo version to 2.1.2 (#25296) 2019-07-23 21:29:04 +02:00
cgtobi aa062176ca Clean up Netatmo sensor code (#25390)
* Clean up code

* Add parameter

* Make it a list

* Move loop and add debug message

* Further clean up

* Move manual config
2019-07-23 21:27:54 +02:00
cgtobi b0b2b0d654 Fix preset service call (#25358) 2019-07-20 17:58:06 -07:00
cgtobi c7ebd109b8 Make presets prettier (#25245) 2019-07-18 10:27:04 -07:00
cgtobi 25285ef6a7 Fix Netatmo climate battery level (#25165)
* Interpolate battery level

* Sort list
2019-07-16 04:27:28 +02:00
cgtobi 831564784a Add Netatmo climate battery level (#25143)
* Add battery level sensor

* Only update battery level if lower or nonexistent
2019-07-15 09:46:48 +02:00
cgtobi e6a2dde19a Fix aggregation in Netatmo public sensor (#25132)
* Clean up values

* Fix divisor
2019-07-14 12:46:17 +02:00
cgtobi c6b63b15b8 Add more public rain sensors (#25117) 2019-07-12 22:05:54 -04:00
cgtobi a9980c8be0 Fix Netatmo climate issue when device out of reach (#25096)
* Fix valve/thermostat out of reach

* Fix boost for valves

* Set netatmo default max temp to 30

* Remove unnecessary get

* Remove unnecessary default value

* Readd get
2019-07-12 17:43:18 +02:00
cgtobi 8652c84745 Fix Netatmo rain gauge precision (#25036) 2019-07-09 19:57:29 +02:00
cgtobi 07b635e7aa Fix Netatmo climate presets (#25029)
* Fix netatmo presets

* Remove off mode for valves

* Revert usage of global const

* Flip values

* Remove try...except block
2019-07-09 10:40:02 +02:00
Pascal Vizeli 84cf76ba36
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3

* fix flake

* Lint

* Update Google Assistant

* ambiclimate to climate 1.0 (#24911)

* Fix Alexa

* Lint

* Migrate zhong_hong

* Migrate tuya

* Migrate honeywell to new climate schema (#24257)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

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

* Update homeassistant/components/climate/const.py

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

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* Fix PRESET can be None

* apply PR#23913 from dev

* remove EU component, etc.

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* apply PR#23913 from dev

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* delint, move debug code

* away preset now working

* code tidy-up

* code tidy-up 2

* code tidy-up 3

* address issues #18932, #15063

* address issues #18932, #15063 - 2/2

* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C

* add low/high to set_temp

* add low/high to set_temp 2

* add low/high to set_temp - delint

* run HA scripts

* port changes from PR #24402

* manual rebase

* manual rebase 2

* delint

* minor change

* remove SUPPORT_HVAC_ACTION

* Migrate radiotherm

* Convert touchline

* Migrate flexit

* Migrate nuheat

* Migrate maxcube

* Fix names maxcube const

* Migrate proliphix

* Migrate heatmiser

* Migrate fritzbox

* Migrate opentherm_gw

* Migrate venstar

* Migrate daikin

* Migrate modbus

* Fix elif

* Migrate Homematic IP Cloud to climate-1.0 (#24913)

* hmip climate fix

* Update hvac_mode and preset_mode

* fix lint

* Fix lint

* Migrate generic_thermostat

* Migrate incomfort to new climate schema (#24915)

* initial commit

* Update climate.py

* Migrate eq3btsmart

* Lint

* cleanup PRESET_MANUAL

* Migrate ecobee

* No conditional features

* KNX: Migrate climate component to new climate platform (#24931)

* Migrate climate component

* Remove unused code

* Corrected line length

* Lint

* Lint

* fix tests

* Fix value

* Migrate geniushub to new climate schema (#24191)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

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

* Update homeassistant/components/climate/const.py

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

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* delinted

* delinted

* use latest client

* clean up mappings

* clean up mappings

* add duration to set_temperature

* add duration to set_temperature

* manual rebase

* tweak

* fix regression

* small fix

* fix rebase mixup

* address comments

* finish refactor

* fix regression

* tweak type hints

* delint

* manual rebase

* WIP: Fixes for honeywell migration to climate-1.0 (#24938)

* add type hints

* code tidy-up

* Fixes for incomfort migration to climate-1.0 (#24936)

* delint type hints

* no async unless await

* revert: no async unless await

* revert: no async unless await 2

* delint

* fix typo

* Fix homekit_controller on climate-1.0 (#24948)

* Fix tests on climate-1.0 branch

* As part of climate-1.0, make state return the heating-cooling.current characteristic

* Fixes from review

* lint

* Fix imports

* Migrate stibel_eltron

* Fix lint

* Migrate coolmaster to climate 1.0 (#24967)

* Migrate coolmaster to climate 1.0

* fix lint errors

* More lint fixes

* Fix demo to work with UI

* Migrate spider

* Demo update

* Updated frontend to 20190705.0

* Fix boost mode (#24980)

* Prepare Netatmo for climate 1.0 (#24973)

* Migration Netatmo

* Address comments

* Update climate.py

* Migrate ephember

* Migrate Sensibo

* Implemented review comments (#24942)

* Migrate ESPHome

* Migrate MQTT

* Migrate Nest

* Migrate melissa

* Initial/partial migration of ST

* Migrate ST

* Remove Away mode (#24995)

* Migrate evohome, cache access tokens (#24491)

* add water_heater, add storage - initial commit

* add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

* Add Broker, Water Heater & Refactor

add missing code

desiderata

* update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

* bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

* support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

* store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

* update CODEOWNERS

* fix regression

* fix requirements

* migrate to climate-1.0

* tweaking

* de-lint

* TCS working? & delint

* tweaking

* TCS code finalised

* remove available() logic

* refactor _switchpoints()

* tidy up switchpoint code

* tweak

* teaking device_state_attributes

* some refactoring

* move PRESET_CUSTOM back to evohome

* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome

* refactor SP code and dt conversion

* delinted

* delinted

* remove water_heater

* fix regression

* Migrate homekit

* Cleanup away mode

* Fix tests

* add helpers

* fix tests melissa

* Fix nehueat

* fix zwave

* add more tests

* fix deconz

* Fix climate test emulate_hue

* fix tests

* fix dyson tests

* fix demo with new layout

* fix honeywell

* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)

* Lint

* PyLint

* Pylint

* fix fritzbox tests

* Fix google

* Fix all tests

* Fix lint

* Fix auto for homekit like controler

* Fix lint

* fix lint
2019-07-08 14:00:24 +02:00
cgtobi e93919673e Implement ADR0003 for Netatmo sensor (#24944)
* Remove configurable monitored conditions

* Only process existing modules

* Remove unused import

* Fix linter error
2019-07-05 09:41:18 +02:00
cgtobi e8d9fe0aa8 Fix home coach discovery (#24902)
* Fix home coach discovery

* Update requirements file
2019-07-02 21:55:01 -04:00
cgtobi a69a00785f Fix netatmo weatherstation setup error (#24788)
* Check if station data exists and reduce calls

* Fix module names list

* Add warning

* Remove dead code
2019-06-27 20:16:46 -07:00
cgtobi da57f92796 Handle timeouts gracefully (#24752) 2019-06-25 08:57:43 -07:00
cgtobi 9a01cd84c2 Bump pyatmo to v2.1.0 (#24724) 2019-06-24 07:43:49 +02:00
cgtobi 128e66fa24 Bump version pyatmo to 2.0.1 (#24703) 2019-06-23 07:50:04 +02:00
Daniel Høyer Iversen b0e6f34976
Improve stability of netatmo sensor (#24190)
* Improve stability of netatmo sensor

* Improve stability of netatmo sensor

* Improve stability of netatmo sensor

* netatmo, except timeout

* netatmo, except timeout

* netatmo, except timeout

* netatmo, except timeout

* Always release lock
2019-06-14 21:26:02 +02:00
cgtobi 1efccf2d90 Bump pyatmo to 2.00 (#24505)
* Bump pyatmo version to 1.13

* Bump to 2.00

* Fix version number
2019-06-12 14:14:00 -07:00
cgtobi 9ca5bdda7f Add exception handling for Netatmo climate (#24311)
* Add exception handling

* Make pylint happy
2019-06-06 09:30:16 +02:00
maheus c840771c0a Add station name for creating the unique_id in netatmo platform (#24141) 2019-05-27 18:07:59 +02:00
cgtobi fa20957e01
Bump pyatmo version to 1.12 (#24088) 2019-05-26 12:09:02 +02:00
Paulus Schoutsen 1de0a0bbb9
Convert stream source to method (#23905)
* Convert stream source to method

* Use async with
2019-05-23 09:45:30 -07:00
Daniel Høyer Iversen 7716e8fb68 Netatmo, handle offline device (#23907)
* Netatmo, handle offline device

* style
2019-05-16 18:07:37 +02:00
Pascal Vizeli 7a4238095d Fix auto discovery if the monitor condition (#23880) 2019-05-15 16:27:41 +02:00
cgtobi 0e9d71f232 Bump pyatmo to v1.11 (#23766) 2019-05-08 21:08:07 -07:00
cgtobi f0f6787bf9 Merge netatmo_public sensor into the netatmo integration (#23531)
* Merge netatmo public into netatmo integration

* Remove netatmo_public platform

* Remove dev log messages

* Improve error handling

* Check config for unsupported conditions

* Fix linter

* Reduce nested blocks
2019-05-08 08:26:52 +02:00
cgtobi b84ba93c42 Refactor netatmo to use hass.data (#23429)
* Refactor NETATMO_AUTH to use hass.data

* Minor cleanup

* Rename conf to auth and other suggestions by Martin

* Revert webhook name change

* Rename constant

* Move auth

* Don't use hass.data.get()

* Fix auth string
2019-04-26 17:15:37 +02:00
Pascal Vizeli f4e7364651 Netatmo 5min fetch interval (#23341) 2019-04-24 09:54:51 -07:00
cgtobi 6ab158ba88 Bump pyatmo version (#23116) 2019-04-15 10:58:02 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen c94b031db1
Fix unnecessary hass.components interaction (#23029)
* Fix wemo

* Fix bloomsky

* Fix netatmo

* Fix one more reference
2019-04-11 23:37:45 -07:00
cgtobi c2cfc4a813 Stream support for Netatmo cameras (#22952)
* Add stream feature

* Add a missing slash

* Get config parameter

* Get default quality
2019-04-10 16:10:14 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
shanbs 0d46e2c0b5 Fix the crash due to absence of the "default_home" in HomeData from pyatmo (netatmo/climate) (#22363) 2019-03-25 01:31:22 +01:00
cgtobi d2a83c2732 Upgrade netatmo smart_home module (#22365) 2019-03-25 01:30:21 +01:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
cgtobi 018a5d5c1f Bring back the boiler status (#22021) 2019-03-14 10:18:25 -07:00
Daniel Høyer Iversen 7a7080055e Netatmo, handle missing thermostat devices (#21651) 2019-03-04 15:54:21 -08:00
shanbs c25cbccca9 Return Netatmo climate operation_mode instead of boiler status (#21633)
* Merge the devices into one list and add into entries at once; Return operation_mode instead of boiler status.

* Removing property operation_mode
2019-03-04 02:42:29 +01:00
shanbs 18372ad81b Added support for multiple Netatmo thermostats/valves (#19407)
* climate/netatmo: Added support for muletiple thermostats/valves

* Adjusted the update interval throttle to 10 seconds

* Avoid returning 'homes' without 'therm_schedules'

* Requires home to have 'modules' as well as 'therm_schedules'; Using pyatmo 1.7

* Support multiple homes

* Fix nest level too deep issue

* Fix crashing bug when discovery is true

* Fix crashing bug when discovery is true

* Modifications according to review comments

* Resolve format issue

* Fix mode name issue

* Revisions according to review's suggestions

* Revisions according to review's comments

* Revisions according to review's comments
2019-03-02 19:51:42 -08:00
Daniel Høyer Iversen b588c1fe1c Handle connection issue for netatmo (#21346)
* Handle connection issue for netatmo

* reduce logging
2019-02-24 00:41:38 +01:00
Daniel Perna 9d3eaada27
Netatmo, address comments from #20755 (#21157)
Netatmo component cleanup
2019-02-19 10:53:45 +01:00
Daniel Perna 847711ddc9
Add webhook support for Netatmo Cameras (#20755)
Add webhook support for Netatmo Cameras
2019-02-17 12:31:47 +01:00
msvinth df598544d6 Make Netatmo able to discover both Weather station and Health Coach (#20274)
* Resolve conflicts and review comments

* Corretly handle HomeCoach in manual setup

* Fix code reivew comments

* Move import back int methods

* Formatting fix

* Lint fix
2019-02-17 11:45:58 +01:00
Joakim Plate c5de32e7b1 Climate const.py move (#20945)
* Move constants to const.py

* Import from const instead of climate
2019-02-14 20:34:43 +01:00
Fabian Affolter 161c368c9d Update file header (#21054)
* Update file header

* Update __init__.py
2019-02-13 20:35:12 -08:00
carstenschroeder 1e69848af4 Updates pyatmo to 1.8 and adds exception handling (#20938)
* switch to pyatmo 1.7 & add exception handling

* STATE_UNKNOWN => None

* correct too long line

* delete whitespace

* remove fancy update logic
2019-02-12 11:12:44 +00:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00