Commit Graph

8531 Commits (1a68784852472c85a5fbb3ae7001283bd7a43b23)

Author SHA1 Message Date
J. Nick Koston 25b39b36e7
Ignore missing devices when in ssdp unsee (#55553) 2021-09-03 09:06:07 -07:00
Paulus Schoutsen 418d6a6a41
Guard for unexpected exceptions in device automation (#55639)
* Guard for unexpected exceptions in device automation

* merge

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-03 09:04:50 -07:00
ehendrix23 4310a7d814
Add upnp sensor for IP, Status, and Uptime (#54780)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-09-03 17:15:28 +02:00
Erik Montnemery 4684ea2d14
Prevent 3rd party lib from opening sockets in broadlink tests (#55636) 2021-09-03 10:13:35 +02:00
Paulus Schoutsen 0c2772e0be
Fix template sensor availability (#55635) 2021-09-03 09:02:45 +02:00
Pascal Vizeli 8319f232b8
Disable observer for USB on containers (#55570)
* Disable observer for USB on containers

* remove operating system test

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-03 08:05:37 +02:00
J. Nick Koston d8a81a54d8
Narrow zwave_js USB discovery (#55613)
- Avoid triggering discovery when we can know in advance the
  device is not a Z-Wave stick
2021-09-03 05:11:03 +02:00
Erik Montnemery 7dbe8070f7
Mock out network.util.async_get_source_ip in tests (#55592) 2021-09-02 20:44:50 +02:00
J. Nick Koston 363320eedb
Mock sockets in the network integration tests (#55594) 2021-09-02 20:44:42 +02:00
Erik Montnemery 2e5c1236f9
Prevent 3rd party lib from opening sockets in freedompro tests (#55596) 2021-09-02 19:32:19 +02:00
Erik Montnemery 348bdca647
Prevent 3rd party lib from opening sockets in epson tests (#55595) 2021-09-02 19:30:53 +02:00
Erik Montnemery cabb9c0ea4
Prevent 3rd party lib from opening sockets in broadlink tests (#55593) 2021-09-02 19:03:24 +02:00
Erik Montnemery bfd799dc04
Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
Erik Montnemery acdddabe1f
Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
Erik Montnemery d5b6dc4f26
Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
Erik Montnemery cdaba62d2c
Add test fixture for unauthenticated HTTP client (#55561)
* Add test fixture for unauthenticated HTTP client

* Remove things from the future
2021-09-02 13:09:16 +02:00
Raman Gupta 02eba22068
Add additional test coverage for zwave_js meter sensors (#55465) 2021-09-01 17:22:17 -04:00
Erik Montnemery 7dbd0e5274
Fix zeroconf mock and use it in CI group 1's tests (#55526)
* Fix zeroconf mock and use it in CI group 1's tests

* Mock HaAsyncServiceBrowser
2021-09-01 22:38:00 +02:00
Erik Montnemery e631671832
Use respx.mock in generic camera tests (#55521) 2021-09-01 20:45:29 +02:00
Paulus Schoutsen 27e29b714c
Bump cloud to 0.47.1 (#55312)
* Bump cloud to 0.47.0

* Bump reqs

* Bump to 0.47.1

* Do not load hass_nabucasa during http startup

* fix some tests

* Fix test

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
2021-09-01 09:54:54 -07:00
epenet f8ec85686a
Add select platform to Renault integration (#55494)
* Add select platform to Renault integration

* Fix pylint
2021-09-01 14:44:10 +02:00
Joakim Sørensen 33fb080c1e
Add remote server to cloud system health (#55506)
* Add sintun server to cloud system health

* Update name

* Adjust test
2021-09-01 13:23:50 +02:00
Paulus Schoutsen 9284f7b147
Tweaks for the iotawatt integration (#55510) 2021-09-01 13:18:50 +02:00
epenet bcf97cb308
Add device tracker platform to Renault integration (#54745) 2021-09-01 13:10:48 +02:00
Joakim Sørensen befcafbc49
Mock setup in spotify tests (#55515) 2021-09-01 11:27:21 +02:00
epenet 02b7356596
Add services to Renault integration (#54820)
* Add services

* Add tests

* Cleanup async

* Fix pylint

* Update services.yaml

* Add extra schema validation

* Rename constants

* Simplify code

* Move constants

* Fix pylint

* Cleanup constants

* Drop charge_set_mode as moved to select platform

* Only register the services if no config entry has registered them yet

* Replace VIN with device selector to select vehicle

* Update logging

* Adjust type checking

* Use a shared base SERVICE_VEHICLE_SCHEMA

* Add selectors for ac_start (temperature/when)

* Add object selector for charge_set_schedules service
2021-09-01 11:23:54 +02:00
mbo18 a28593f133
Add vacation mode to manual alarm_control_panel (#55340)
* Add vacation mode

* Add vacation to demo

* Deduplicate code in tests
2021-09-01 09:34:21 +02:00
Erik Montnemery 93c086d830
Correct sum statistics when only last_reset has changed (#55498)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-31 21:30:52 -07:00
Erik Montnemery 5d1a193eca
Improve log for sum statistics (#55502) 2021-08-31 19:15:22 +02:00
Joakim Sørensen 3e38dc0fd9
Add cache-control headers to supervisor entrypoint (#55493) 2021-08-31 14:45:28 +02:00
Erik Montnemery f9225bad5f
Make new cycles for sensor sum statistics start with 0 as zero-point (#55473) 2021-08-31 10:45:17 +02:00
Eric Severance 88a08fdf57
Wemo Insight devices need polling when off (#55348) 2021-08-31 09:32:26 +02:00
Paulus Schoutsen d277e0fb03
Add Eagle 200 name back (#55477)
* Add Eagle 200 name back

* add comment

* update tests
2021-08-31 08:45:35 +02:00
Matthew Garrett dd21bf73fc
Assistant sensors (#55480) 2021-08-30 20:33:06 -07:00
Erik Montnemery 18c03e2f8d
Fix race in MQTT sensor when last_reset_topic is configured (#55463) 2021-08-30 23:32:35 +02:00
ha0y 433775cf4b
Add input_select and select domain support for HomeKit (#54760)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-30 15:28:26 -05:00
Greg 3bd9be2f6d
Add IoTaWatt integration (#55364)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-30 12:52:29 -07:00
Raman Gupta 331726ec2f
Bump zwave-js-server-python to 0.29.1 (#55460) 2021-08-30 09:40:56 -07:00
Erik Montnemery ed53bb1d91
Revert "Deprecate last_reset options in MQTT sensor" (#55457)
This reverts commit f9fa5fa804.
2021-08-30 16:58:48 +02:00
Erik Montnemery 722aa0895e
Improve statistics error messages when sensor's unit is changing (#55436)
* Improve error messages when sensor's unit is changing

* Improve test coverage
2021-08-30 12:51:46 +02:00
uvjustin 071fcee9a9
Remove byte-range addressed parts in stream (#55396)
Add individually addressed parts
2021-08-30 13:20:19 +08:00
J. Nick Koston 5549a925b8
Implement import of consider_home in nmap_tracker to avoid breaking change (#55379) 2021-08-29 20:38:41 -07:00
Klaas Schoute 6823b14d4c
Update entity names for P1 Monitor integration (#55430) 2021-08-29 20:29:37 -07:00
Aaron Bach 32df2f7d8b
Deprecate YAML config for ReCollect Waste (#55426) 2021-08-29 14:03:44 -06:00
uvjustin 923158cfba
Add ll hls to stream (#49608) 2021-08-29 09:53:41 +08:00
Michael 13cc671844
Re-configuration possibilities for Synology DSM (#53285)
* add automated host/ip reconfig via SSDP

* add reconfig of existing entry

* adjust tests

* adjust tests again

* use self._async_current_entries()

* _async_get_existing_entry()

* apply suggestions
2021-08-28 14:11:51 -05:00
Matthieu 979797136a
Add select entity to Logitech Harmony (#53943)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-28 14:10:19 -05:00
jan iversen 16351ef3c2
Add shutdown test. (#55357) 2021-08-28 08:11:58 +02:00
Raman Gupta 714564eaa6
Listen to node events in the zwave_js node status sensor (#55341) 2021-08-27 15:01:20 -07:00
Aaron Bach 1f37c215f6
Ensure ReCollect Waste starts up even if no future pickup is found (#55349) 2021-08-27 15:00:17 -07:00
J. Nick Koston 10fa63775d
Ensure yeelights resync state if they are busy on first connect (#55333) 2021-08-27 12:43:53 -05:00
J. Nick Koston 2cc87cb7ab
Retrigger config flow when the ssdp location changes for a UDN (#55343)
Fixes #55229
2021-08-27 09:53:29 -07:00
jan iversen 7ac72ebf38
Add modbus name to log_error (#55336) 2021-08-27 09:26:57 -07:00
Chris Talkington 819fd811af
Fix reauth for sonarr (#55329)
* fix reauth for sonarr

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py
2021-08-27 11:04:07 -05:00
Erik Montnemery 7e70252de5
Handle statistics for sensor with changing state class (#55316) 2021-08-27 16:18:49 +02:00
epenet 9ba504cd78
Address late review for Renault integration (#55230)
* Add type hints

* Fix isort

* tweaks to state attributes

* Move lambdas to regular functions

* Split CHECK_ATTRIBUTES into DYNAMIC_ATTRIBUTES and FIXED_ATTRIBUTES

* Clarify tests

* Fix typo
2021-08-27 07:22:23 +02:00
Matthias Alphart cd0ae66d58
Add CONF_STATE_CLASS to `sensor/__init__.py` (#54106)
* add CONF_STATE_CLASS to const.py

* move to `sensor/__init__.py`

* move to sensor/const.py

* Revert "move to sensor/const.py"

This reverts commit 604d0d066b.

* move it to `sensor/const.py` but import it from `sensor/__init__.py`

* add Modbus
2021-08-27 05:54:50 +02:00
J. Nick Koston dfc2556669
Gracefully handle pyudev failing to filter on WSL (#55286)
* Gracefully handle pyudev failing to filter on WSL

* add debug message

* add mocks so we reach the new check
2021-08-26 15:47:10 -05:00
Chris 14aa19b814
Fix unique_id conflict in smarttthings (#55235) 2021-08-26 13:43:26 -07:00
J. Nick Koston c3972b22fd
Fix yeelight brightness when nightlight switch is disabled (#55278) 2021-08-26 15:18:36 -05:00
J. Nick Koston ae1d2926cf
Fix some yeelights showing wrong state after on/off (#55279) 2021-08-26 13:25:26 -05:00
J. Nick Koston 089dfad78a
Ensure yeelight model is set in the config entry (#55281)
* Ensure yeelight model is set in the config entry

- If the model was not set in the config entry the light could
  be sent commands it could not handle

* update tests

* fix test
2021-08-26 13:02:59 -05:00
J. Nick Koston fbcf21412d
Only warn once per entity when the async_camera_image signature needs to be updated (#55238) 2021-08-26 09:36:25 -07:00
J. Nick Koston d59ea5329e
Abort zha usb discovery if deconz is setup (#55245)
* Abort zha usb discovery if deconz is setup

* Update tests/components/zha/test_config_flow.py

* add deconz domain const

* Update homeassistant/components/zha/config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2021-08-26 10:00:32 -04:00
J. Nick Koston d4fa625a7f
Defer zha auto configure probe until after clicking configure (#55239) 2021-08-26 09:59:41 -04:00
J. Nick Koston a89057ece5
Limit USB discovery to specific manufacturer/description/serial_number matches (#55236)
* Limit USB discovery to specific manufacturer/description/serial_number matches

* test for None case
2021-08-26 09:59:02 -04:00
Erik Montnemery 0a07ff4d23
Warn if a sensor with state_class_total has a decreasing value twice (#55251) 2021-08-26 14:27:14 +02:00
Franck Nijhof 96303a1d80
Fix MQTT add-on discovery to be ignorable (#55250) 2021-08-26 11:14:42 +02:00
Joakim Sørensen 03d3bbfba1
Only postfix image name for container (#55248) 2021-08-26 10:54:42 +02:00
epenet 9315f3bdd9
Use EntityDescription - renault (#55061)
* Cleanup sensor.py

* Add EntityDescription

* Add checks for state attributes

* Fix pylint

* Simplify checks

* Add icon checks

* Update data type

* Use mixin for required keys, and review class initialisation

* Add constraint to TypeVar("T")

* Enable lambda for icon handling

* Enable lambda for value handling

* Enable lambda for value handling
2021-08-25 23:15:49 +02:00
J. Nick Koston 35d943ba56
Add services to bond to start and stop increase/decrease brightness (#55006) 2021-08-25 22:07:31 +02:00
J. Nick Koston e6e8d7eded
Convert color temperature to visible color in lights (#55219) 2021-08-25 21:56:36 +02:00
Milan Meulemans 59d401e7b7
Add Nanoleaf reauth flow (#55217)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-25 21:56:10 +02:00
Diogo Gomes fb28665cfa
Add "cron patterns" to define utility_meter cycles (#46795)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-25 14:52:39 -05:00
Paulus Schoutsen 7c5a0174ba
Add an energy solar platform for solar forecasts (#54576)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-25 11:37:03 -07:00
Raman Gupta e9625e4b7a
Add number platform to template integration (#54789) 2021-08-25 11:34:20 -07:00
Raman Gupta 8407ad01d4
Add select platform to template integration (#54835) 2021-08-25 11:21:24 -07:00
Milan Meulemans d4b506e5e4
Add tests for Rituals init, sensor and switch (#52406) 2021-08-25 12:25:39 -05:00
Giuseppe Iannello ec3bfcea46
Support for EnergyStorageTrait for vacuum cleaners (#55134) 2021-08-25 10:12:31 -07:00
Milan Meulemans 5c6451d11b
Address review of Nanoleaf Config Flow (#55215) 2021-08-25 17:41:48 +02:00
J. Nick Koston bd0af57ef2
Support device triggers in HomeKit (#53869) 2021-08-25 16:47:39 +02:00
Erik Montnemery 20d8c4da90
Report average of position and tilt_position for cover groups (#52713) 2021-08-25 16:12:29 +02:00
Marc Mueller 1224d68d05
Remove redundant str cast - sensor value conversion (#55204) 2021-08-25 15:01:17 +02:00
Daniel Hjelseth Høyer 7dd169b48e
Utility meter, add STATE_CLASS_TOTAL_INCREASING (#54871)
* Utility meter, STATE_CLASS_TOTAL_INCREASING

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* update test

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* update test

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-08-25 14:03:30 +02:00
Jan Bouwhuis f4fbc083e6
Tasmota - Cleanup tests involving legacy fan speed (#55202) 2021-08-25 13:54:36 +02:00
Marc Mueller 7f203069a4
Use EntityDescription - mhz19 (#55187)
* Use EntityDescription - mhz19

* Fix tests
2021-08-25 13:52:59 +02:00
Erik Montnemery bb42eb1176
Warn if a sensor with state_class_total has a decreasing value (#55197) 2021-08-25 13:01:55 +02:00
Erik Montnemery ffbd2d79c8
Generate statistics for all sensors with a supported state_class (#54882)
* Generate statistics for all sensors

* Fix bugs, add tests

* Address review comments

* Cleanup warnings

* Simplify tests

* Simplify selection of statistics

* Fix tests
2021-08-25 13:00:35 +02:00
jan iversen 7df8d0c973
Check for duplicate host/port and integration name in modbus (#54664)
* Check for duplicate host/port and integration name.

* Change to use set().

* Please CI.

* Add basic tests.
2021-08-25 12:29:00 +02:00
Meow a23f4dac62
Add service to clear completed shoppinglist items (#55032) 2021-08-25 12:26:37 +02:00
Matthias Alphart 51361fbd2b
Add configurable `state_class` to Modbus sensors (#54103)
* add configurable state_class

* Add test of new parameter.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-08-25 11:50:54 +02:00
Klaas Schoute 49041b1469
Add account type to Forecast.Solar integration (#55175) 2021-08-25 11:16:23 +02:00
Marc Mueller 4036ba82fe
Remove temperature conversion - mhz19 (#55164) 2021-08-25 10:29:59 +02:00
Paulus Schoutsen 1e05c81fe6
Fix recorder test (#55169)
Co-authored-by: Erik <erik@montnemery.com>
2021-08-25 08:48:13 +02:00
Aaron Bach 24d017f974
Add ability to configure OpenUV "protection window" UV indices (#54562) 2021-08-24 15:37:50 -05:00
Alexei Chetroi 289734c748
Update ZHA config entry radio detection (#55128) 2021-08-24 15:25:31 -05:00
Milan Meulemans 8570502681
Convert Nanoleaf yaml and discovery to config flow (#52199)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-24 14:09:36 -05:00
Alexei Chetroi 2927dcd809
Use a debouncer when updating ZHA group state (#53263) 2021-08-24 10:09:36 -07:00
Erik Montnemery 38f0020619
Improve Tasmota MQTT discovery flow (#55147) 2021-08-24 18:08:17 +02:00
Erik Montnemery 2c997586eb
Deduplicate code in MQTT alarm_control_panel tests (#55149) 2021-08-24 18:06:39 +02:00
Erik Montnemery fa9f91325c
Allow small dip in total_increasing sensor without detecting a reset (#55153) 2021-08-24 17:23:55 +02:00
Erik Montnemery 8877f37da0
Fix statistics for sensors setting last_reset (#55136)
* Re-add state_class total to sensor

* Make energy cost sensor enforce state_class total_increasing

* Drop state_class total

* Only report energy sensor issues once
2021-08-24 17:02:34 +02:00
jan iversen de7352dbde
Convert template/vacuum to pytest with fixtures (#54841) 2021-08-24 14:11:40 +02:00
Erik Montnemery 828d862339
Fix Tasmota MQTT discovery flow (#55140) 2021-08-24 13:23:26 +02:00
posixx 547ede1e91
Implementation of new Vacation mode for MQTT-based alarm panels (#53561)
* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* missing abbreviation

* Fix tests

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-24 13:22:49 +02:00
jjlawren d5fe7e0e5a
Fallback to try all known Plex servers if none marked present (#53643) 2021-08-24 12:05:24 +02:00
Matthias Alphart 19d81af4c1
Test KNX fan (#53621) 2021-08-24 12:00:37 +02:00
Jan Bouwhuis 5bb9aa8f3d
Remove MQTT Fan legacy speeds (#54768)
* Remove MQTT Fan legacy speeds

* deprecated attibutes are not disruptive
2021-08-24 11:21:35 +02:00
J. Nick Koston dc851b9dd5
Ensure camera scaling always produces an image of at least the requested width and height (#55033) 2021-08-24 10:44:12 +02:00
epenet ccaf0d5c75
Use EntityDescription - onewire (#55003) 2021-08-24 10:37:59 +02:00
Paulus Schoutsen 9fc96818df
Guard for unparsable date time (#55108) 2021-08-23 23:56:47 -07:00
Paulus Schoutsen cac486440f
Mark eagle entities as unavailable if connection with meter losts (#55102) 2021-08-23 22:35:26 -07:00
J. Nick Koston ce0a42a407
Fix updating device path from discovery in zha (#55124) 2021-08-23 22:36:24 -05:00
Giuseppe Iannello 4d7de0fd4c
Add support for Google Assistant's LocatorTrait for vacuum cleaners (#55015)
* Support for LocatorTrait for vacuum cleaners

* Handle Locator request with `silence: True`

* Update homeassistant/components/google_assistant/trait.py

Co-authored-by: Joakim Plate <elupus@ecce.se>

* Black

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-23 20:16:50 -07:00
RDFurman 2aed7b94c5
Add multi device support back to honeywell (#54003)
* Add multi device support back to honeywell

* Fix device reference in honeywell climate

* Use deviceid for unique_id

* Add test for multiple thermostats

* Reduce recursive jobs

* Remove old filter

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-23 17:54:55 -05:00
jan iversen f91d214ba4
Break out mock of pymodbus return from mock_modbus to new fixture (#55063)
* Remove unused mock_modbus.

* Break out mock pymodbus return values.

* Review comments.
2021-08-23 23:55:57 +02:00
J. Nick Koston 99465f53c7
Bump HAP-python to 4.1.0 (#55005) 2021-08-23 21:00:26 +02:00
Robert Svensson 6ad0e0220a
Update alarm control panel and deconz alarm event to reflect the finalized implementation in deCONZ (#54936)
* Update alarm control panel and deconz alarm event to reflect the new implementation in deCONZ

* Bump dependency to v83
2021-08-23 20:56:45 +02:00
Marc Mueller 4d452dbccf
Use EntityDescription - fido (#55037) 2021-08-23 20:56:15 +02:00
Jc2k 0065bbc56d
Add volatile organic compounds to homekit_controller (#55093) 2021-08-23 20:47:09 +02:00
Franck Nijhof 2cdaf632a4
Restore last_triggered state in scripts (#55071) 2021-08-23 11:05:29 -07:00
Erik Montnemery ee3e27c82a
Add support for white to light groups (#55082) 2021-08-23 18:29:44 +02:00
Martin Hjelmare 716abaa9b1
Prefer discovered usb device over add-on config in zwave_js (#55056) 2021-08-23 13:50:08 +02:00
Jc2k 2dd4de060b
Add device class for volatile organic compounds (#55050) 2021-08-23 11:14:43 +02:00
Pawel f72bf2145b
Remove deprecated YAML configuration from Epson (#55045) 2021-08-23 09:53:23 +02:00
Erik Montnemery 03bda6ed15
Enable basic type checking for almond (#54927)
* Enable basic type checking for almond

* Tweak

* Address review comments
2021-08-23 09:35:03 +02:00
Robert Hillis e5d6e18e30
Complete config flow tests for sense (#55040) 2021-08-23 07:58:42 +02:00
Raman Gupta 5f5c8ade41
Fix validation for zwave_js device trigger and condition (#54974) 2021-08-22 20:43:59 -04:00
J. Nick Koston 562212bb5e
Add support for bridge accessory unavailability (#52207)
Co-authored-by: Jc2k <john.carr@unrouted.co.uk>
2021-08-22 21:20:40 +02:00
Eric Severance e6ba3b41cb
Add Binary Sensor for WeMo Insight & Maker (#55000)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-22 20:09:22 +02:00
jan iversen da20552cd8
Remove base_test from modbus test harness (#55018)
* Remove base_test.

* Review comments.
2021-08-22 19:59:38 +02:00
J. Nick Koston b6a1153d42
Skip trying the pyudev observer when using standalone docker for usb (#54987) 2021-08-22 11:30:35 -05:00
Jørgen Rørvik b942454312
Fix manual setup when roomba is on different subnet (#54639)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-08-21 20:01:41 -05:00
J. Nick Koston 42f7f19be5
Switch periodic USB scanning to on-demand websocket when observer is not available (#54953) 2021-08-21 16:06:44 -05:00
Marc Mueller a931e35a14
Use EntityDescription - google_wifi (#54941) 2021-08-21 21:59:06 +02:00
Eric Severance 67d04b6082
Use DataUpdateCoordinator for wemo (#54866)
* Use DataUpdateCoordinator for wemo

* Rename DeviceWrapper->DeviceCoordinator and make it a subclass of DataUpdateCoordinator

* Rename async_update_data->_async_update_data to override base class

* Rename: device -> coordinator
2021-08-21 20:14:55 +02:00
J. Nick Koston a7d8e2b817
Add support for USB discovery to zwave_js (#54938)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-21 09:30:45 -05:00
jan iversen 33f660118f
Add lazy_error_count to modbus (#54412)
* Add lazy_error_count.

* Use -=

* Review comments.
2021-08-21 15:49:50 +02:00
J. Nick Koston 51434c5faa
Gracefully handle udev not available via OSError when setting up usb (#54967) 2021-08-21 07:24:45 -05:00
J. Nick Koston c609236a63
Move get_serial_by_id and human_readable_device_name to usb (#54968) 2021-08-21 07:24:21 -05:00
Raman Gupta 726acc38c6
Improve Command Class choices for zwave_js device triggers and conditions (#54970) 2021-08-21 02:57:20 -04:00
Raman Gupta 2be50eb5b4
Add zwave_js device triggers for any zwave value (#54958)
* Add zwave_js device triggers for any zwave value

* translations

* Validate value
2021-08-21 00:09:52 -04:00
Raman Gupta 1075a65bbd
Remove Configuration CC as choice in zwave_js value device condition (#54962) 2021-08-21 00:09:27 -04:00
J. Nick Koston 8796eaec81
Add support for USB discovery to ZHA (#54935)
* Add USB discovery support to ZHA

* dry

* dry

* Update homeassistant/components/zha/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* black

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 20:42:23 -05:00
J. Nick Koston b71f2689d7
Make yeelight aware of the network integration (#54854) 2021-08-20 19:09:22 -05:00
J. Nick Koston 1325b38256
Handle case where location_name is set to "" for zeroconf (#54880) 2021-08-20 14:33:23 -07:00
J. Nick Koston 3cb7227040
Normalize the display name of yeelight devices (#54883)
Co-authored-by: Teemu R. <tpr@iki.fi>
2021-08-20 14:32:48 -07:00
Raman Gupta 63f6a3b46b
Add zwave_js.value_updated automation trigger (#54897)
* Add zwave_js automation trigger

* Rename to align with zwave-js api

* Improve test coverage

* Add additional template variables

* Support states values in addition to keys when present

* remove entity ID from trigger payload

* comments and order

* Add init and dynamically define platform_type

* reduce mypy ignores

* pylint

* pylint

* review

* use module map
2021-08-20 15:21:55 -04:00
J. Nick Koston dc74a52f58
Add support for USB discovery (#54904)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 14:04:18 -05:00
Raman Gupta 11c6a33594
Bump zwave-js-server-python to 0.29.0 (#54931)
* Bump zwave-js-server-python to 0.29.0

* Cover secure flag true paths for add node WS commands
2021-08-20 14:55:58 -04:00
Raman Gupta ef9ad89c23
Add support for area ID in zwave_js service calls (#54940) 2021-08-20 12:55:17 -04:00
Paulus Schoutsen 2ddeb0c013
Ask for host because EAGLE mdns doesn't work in HA OS (#54905) 2021-08-20 07:52:30 -07:00
Erik Montnemery 2fa07777cd
Warn if unit_of_measurement is set on instances of SensorEntityDescription (#54867)
* Add class BaseEntityDescription without unit_of_measurement

* Refactor according to review comments

* Tweak

* Fix offending integrations

* Fix offending integrations
2021-08-20 15:54:57 +02:00
Joakim Plate 1f4c12195e
Fjäråskupan kitchen fan (#53140)
* Add fjäråskupan fan control

* Update tests/components/fjaraskupan/conftest.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/fjaraskupan/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/fjaraskupan/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Increase manual update to 2 minutes

* Address review comments

* Switch to discovery flow

* Address more review comments

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 13:41:36 +02:00
Raman Gupta 3a2afb8bde
Support group entities in zwave_js service calls (#54903) 2021-08-20 11:18:19 +02:00
Klaas Schoute 68fbc0792a
Add P1 Monitor integration (#54738)
* Init integration P1 Monitor

* Fix build error

* Add quality scale

* Remove last_reset and icon

* Change list to tuple

* Close client on connection exception

* Change min value to 5 (seconds)

* the used python package will close it

* Remove the options flow

* Add session and close client

* Smash to a single DataUpdateCoordinator

* Make a custom update coordinator class

* await the coordinator close

* Add second await the coordinator close

* Close when exit scope

* Removed unused code

* Fix test_sensor on entity_id change

* Fix test on test_sensor

* Transfer SENSOR dict to sensor platform

* device class for cost entity update entity_name

* Revert name in unique id and update sensor test

* Update code based on suggestions

* Fix typing

* Change code to fix mypy errors

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 08:45:04 +02:00
Erik Montnemery 32e297f4a0
Compile missing statistics (#54690) 2021-08-19 22:10:45 -07:00
Paulus Schoutsen f1a4ba8bb0
Add Rainforest Eagle tests and price (#54887) 2021-08-19 13:19:31 -07:00
micha91 6eadc0c303
Yamaha Musiccast Media Browser feature (#54864) 2021-08-19 20:42:11 +02:00
Paulus Schoutsen 4ae2a26aa3
Add config flow to Rainforest EAGLE-200 (#54846)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-19 09:22:30 -07:00
J. Nick Koston 8103d9ae3c
Add missing id to yeelights that were setup manually (#54855) 2021-08-19 08:46:14 -05:00
Erik Montnemery 32a2c5d5db
Add support for Swedish smart electricity meters to DSMR (#54630)
* Add support for Swedish smart electricity meters to DSMR

* Use Swedish protocol support from dsmr_parser

* Update tests

* Bump dsmr_parser to 0.30

* Remove last_reset attribute from Swedish energy sensors
2021-08-19 10:11:20 +02:00
jan iversen 0688aaa2b6
Check for duplicate entity name/address in modbus entities (#54669)
* Check for duplicate entity name/address.
2021-08-19 09:37:31 +02:00
epenet faec82ae8f
Add binary sensor platform to Renault integration (#54750)
* Add binary sensor platform

* Add tests

* Simplify code

* Adjust descriptions

* Adjust tests

* Make "fuel" tests more explicit

* Updates for device registry checks
2021-08-19 09:27:43 +02:00
Eric Severance 71b123845c
Always mock SubscriptionRegistry & DiscoveryResponder for wemo tests (#53967)
* Always mock SubscriptionRegistry & DiscoveryResponder for wemo tests

* Use autospec=True for patch
2021-08-19 07:17:16 +02:00
Erik Montnemery c74f9a8313
Remove stale references to last_reset (#54838)
* Remove stale references to last_reset

* Update tests
2021-08-18 21:47:57 +02:00
Erik Montnemery f9fa5fa804
Deprecate last_reset options in MQTT sensor (#54840) 2021-08-18 20:22:01 +02:00
Paulus Schoutsen 2f77b5025c
Add energy validation (#54567) 2021-08-18 11:21:51 -07:00
J. Nick Koston e7a0604a40
Make yeelight discovery async (#54711) 2021-08-18 09:36:13 -07:00
Erik Montnemery bca9360d52
Remove last_reset attribute from tasmota energy sensors (#54836) 2021-08-18 09:25:33 -07:00
J. Nick Koston 5d19575a84
Exclude global scope IPv6 when setting up zeroconf interfaces (#54632) 2021-08-18 09:00:09 -07:00
Raman Gupta c1595d5ceb
Only show zwave_js command classes that are on the node (#54794) 2021-08-18 17:53:00 +02:00
Erik Montnemery e98d50f6d1
Remove `last_reset` attribute and set state class to `total_increasing` for mysensors energy sensors (#54827) 2021-08-18 16:58:13 +02:00
Daniel Hjelseth Høyer 27849426fe
Remove last_reset attribute and set state class to total_increasing for Integration sensors (#54815) 2021-08-18 15:54:11 +02:00
Erik Montnemery 5536e24dec
Remove `last_reset` attribute and set state class to `total_increasing` for zwave_js energy sensors (#54818) 2021-08-18 15:11:10 +02:00
jan iversen bafbbc6563
Adjust modbus constants names (#54792)
* Follow up.
2021-08-18 12:56:54 +02:00
epenet 16cb50bddf
Ensure device entry in Renault integration (#54797)
* Ensure device registry is set even when there are no entities

* Fix isort

* Use async_get for accessing registry
2021-08-18 12:44:35 +02:00
J. Nick Koston 62015f5495
Bump async-upnp-client to 0.20.0, adapt to breaking changes (#54782) 2021-08-18 12:13:59 +02:00
Erik Montnemery e1926caeb9
Remove STATE_CLASS_TOTAL and last_reset from sensor (#54755)
* Remove STATE_CLASS_TOTAL

* Update mill sensor

* Update tests

* Kill last_reset

* Return ATTR_LAST_RESET to utility_meter

* Update energy cost sensor

* Restore last_reset for backwards compatibility

* Re-add and update deprecation warning

* Update tests

* Fix utility_meter

* Update EnergyCostSensor

* Tweak

* Fix rebase mistake

* Fix test
2021-08-18 10:03:27 +02:00
J. Nick Koston 87496ae75c
Fix HomeKit cover creation with tilt position, open/close, no set position (#54727) 2021-08-17 22:41:22 -05:00
Maciej Bieniek 10058ea3f0
Use new device classes in GIOS integration (#54743)
* Use new device classes

* Clean up
2021-08-17 22:35:05 -05:00
Maciej Bieniek bd550c4559
Use AQI, PM1, PM25, PM10 device classes in Airly (#54742) 2021-08-18 02:40:06 +02:00
Erik Montnemery 3a78f1fce6
Force STATE_CLASS_TOTAL_INCREASING to reset to 0 (#54751)
* Force STATE_CLASS_TOTAL_INCREASING to reset to 0

* Tweak

* Correct detection of new cycle

* Fix typing
2021-08-17 23:05:31 +02:00
jan iversen 71b0f6d095
set common test entity name. (#54697) 2021-08-17 20:43:27 +02:00
ehendrix23 8bf79d61ee
Add upnp binary sensor for connectivity status (#54489)
* New binary sensor for connectivity

* Add binary_sensor

* New binary sensor for connectivity

* Add binary_sensor

* Handle values returned as None

* Small text update for Uptime

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Updates based on review

* Update homeassistant/components/upnp/binary_sensor.py

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Further updates based on review

* Set device_class as a class atribute

* Create 1 combined data coordinator
and UpnpEntity class

* Updates on coordinator

* Update comment

* Fix in async_step_init for coordinator

* Add async_get_status to mocked device
and set times polled for each call seperately

* Updated to get device through coordinator
Check polling for each status call seperately

* Use collections.abc instead of Typing for Mapping

* Remove adding device to hass.data as coordinator
is now saved

* Removed setting _coordinator

* Added myself as codeowner

* Update type in __init__

* Removed attributes from binary sensor

* Fix async_unload_entry

* Add expected return value to is_on

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-08-17 20:23:41 +02:00
Franck Nijhof 5b75c8254b
Use path helper method for principal file in google_pubsub (#54744)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-17 19:49:38 +02:00
Raman Gupta cff6883b5c
Add zwave_js Protection CC select entities (#54717)
* Add Protection CC select entities

comment

* Disable entity by default

* use class attribute

* Enable protection entity by default

* add guard for none
2021-08-17 12:22:27 -04:00
LonePurpleWolf 35f563e23e
Airtouch4 integration (#43513)
* airtouch 4 climate control integration

* enhance tests for airtouch. Fix linting issues

* Fix tests

* rework tests

* fix latest qa issues

* Clean up

* add already_configured message

* Use common string

* further qa fixes

* simplify airtouch4 domain storage

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-17 17:29:20 +02:00
Jc2k ea8061469c
Deprecate homekit_controller's air quality entity in favor of separate sensor entities (#54673) 2021-08-17 09:29:52 -05:00
Franck Nijhof 9dab920d01
DSMR: Remove icon from sensors with gas device class (#54752) 2021-08-17 14:26:02 +02:00
Raman Gupta 013b998974
Relax zwave_js lock discovery rules to cover more use cases (#54710) 2021-08-17 13:34:00 +02:00
Maciej Bieniek 4f3d1c5e12
Use PM1, PM25 and PM10 device classes in Nettigo Air Monitor integration (#54741) 2021-08-17 10:49:22 +02:00
Erik Montnemery 0abcfb42b3
Remove last_reset attribute from FritzBoxEnergySensor (#54644) 2021-08-16 23:57:59 +02:00
Jc2k de0460de61
Add device classes that were part of deprecated air quality entity (#54075) 2021-08-16 23:33:28 +02:00
J. Nick Koston 5e51f57f02
Convert nmap_tracker to be a config flow (#54715) 2021-08-16 15:19:32 -05:00
ehendrix23 f40c672cd2
Add light platform to MyQ (#54611)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-16 14:52:53 -05:00
Raman Gupta a41ee9e870
Create zwave-js select platform and discover additional siren values (#53018)
* Create zwave-js select platform and add siren values to number and select platforms

* use constants while we wait for lib release

* comments

* rename stuff in tests to prepare for protection CC PR

* Switch to 0-1 range for number entity

* Update homeassistant/components/zwave_js/number.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Change step

* Switch to ToneID

* Better error handling

* Add test for coerage

Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-16 13:36:20 -04:00
Erik Montnemery 35389a6d28
Remove last_reset attribute from dsmr sensors (#54699) 2021-08-16 18:35:50 +02:00
Raman Gupta 61ab2b0c60
Use zwave_js.number platform for Basic CC values (#54512)
* Use zwave_js.number platform for some Basic CC values

* Remove Basic CC sensor discovery schema

* update comment

* update comment
2021-08-16 12:30:52 -04:00
Adam Bogdał 3e93215a1f
Fix event type names for non-specified Traccar events (#54561)
* Fix event type name

* Extend list of types only when all_events is specified

* Remove flake8 warnings
2021-08-16 15:49:12 +02:00
epenet a204d7f807
Renault code quality improvements (#53680) 2021-08-16 13:49:04 +02:00
Daniel Hjelseth Høyer d11c58dac8
Improve Tractive (#54532)
* Tractive, code improve

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Tractive, code improve

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Tractive, code improve

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Update homeassistant/components/tractive/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/tractive/const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Tractive, comments

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Update homeassistant/components/tractive/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/tractive/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Tractive

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Reauth

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Reauth

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* add tests

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* add tests

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-16 12:56:10 +02:00
epenet 75275254f9
Renault test optimisation (#53705)
* Cleanup tests

* Use a MockConfigEntry

* Don't set up the integration for duplicate config entry testing
2021-08-16 12:52:58 +02:00
Allen Porter 094f7d38ad
Use buffer at stream start with unsupported audio (#54672)
Add a test that reproduces the issue where resetting the iterator
drops the already read packets. Fix a bug in replace_underlying_iterator
because checking the self._next function turns out not to work since
it points to a bound method so the "is not" check fails.
2021-08-15 21:02:37 -07:00
Bram Kragten eb278834de
Add gas support to energy (#54560)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-13 10:39:16 -07:00
Steven Looman 2c1728022d
Use ssdp callbacks in upnp (#53840) 2021-08-13 11:13:25 -05:00
Erik Montnemery 029873a088
Add support for total and total_increasing sensor state classes (#54523)
* Add support for amount and meter sensor state classes

* Ignore last_reset for STATE_CLASS_METER sensors

* Update tests

* Rename STATE_CLASS_METER to STATE_CLASS_AMOUNT_INCREASING

* Rename STATE_CLASS_AMOUNT to STATE_CLASS_TOTAL

* Fix typo

* Log warning if last_reset set together with state_class measurement

* Fix warning message
2021-08-13 12:35:23 +02:00
Erik Montnemery e558b3463e
Move temperature conversions to sensor base class (6/8) (#54476)
* Move temperature conversions to entity base class (6/8)

* Fix tests
2021-08-12 17:40:55 +02:00
Erik Montnemery 6de6a5dc14
Move temperature conversions to sensor base class (3/8) (#54469)
* Move temperature conversions to entity base class (3/8)

* Fix FritzBox sensor

* Fix tests
2021-08-12 14:23:56 +02:00
Erik Montnemery 2720ba2753
Move temperature conversions to sensor base class (4/8) (#54472)
* Move temperature conversions to entity base class (4/8)

* Fix litterrobot sensor

* Fix tests
2021-08-11 21:17:47 +02:00
Erik Montnemery ae507aeed1
Move temperature conversions to sensor base class (8/8) (#54483)
* Move temperature conversions to entity base class (8/8)

* Fix wallbox sensor

* Fix tests
2021-08-11 21:17:16 +02:00
Bram Kragten e23750b2a4
Add device class `gas` and enable statistics for it (#54110)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-11 09:58:19 -07:00
Bram Kragten f020d65416
Add battery support to energy (#54432) 2021-08-11 09:49:56 -07:00
Martin Hjelmare 028a3d3e53
Complete mysensors sensor coverage (#54471) 2021-08-11 17:19:02 +02:00
J. Nick Koston 1e14b3a0ac
Ensure camera handles non-jpeg image sources correctly (#54474) 2021-08-11 08:12:46 -07:00
jan iversen 4ef9269790
Replace prepare_service_call with a simpler fixture in modbus (#53975)
* Convert prepare_service_call to a fixture.
2021-08-11 12:42:28 +02:00
Joakim Sørensen 2f5c3c08ef
Use monitor name for uptimerobot device registry (#54456) 2021-08-11 11:27:41 +02:00
jan iversen 2d669a4613
Remove legacy code. (#54452) 2021-08-11 11:07:04 +02:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
J. Nick Koston 4d40d95848
Add support for width and height to ffmpeg based camera snapshots (#53837) 2021-08-10 20:31:11 -05:00
J. Nick Koston d0b11568cc
Ensure HomeKit passes min/max mireds as ints (#54372) 2021-08-10 20:28:01 -05:00
J. Nick Koston e99576c094
Pass width and height when requesting camera snapshot (#53835) 2021-08-10 19:33:06 -05:00
J. Nick Koston 4ae6435a64
Avoid increasing yeelight rate limit when the state is already set (#54410) 2021-08-10 15:17:49 -07:00
J. Nick Koston 4da451fcf7
Improve HomeKit Color with Color Temp implementation (#54371) 2021-08-10 15:16:51 -07:00
J. Nick Koston 4bde4504ec
Add api to device_automation to return all matching devices (#53361) 2021-08-10 14:21:34 -05:00
Dror Eiger 7e211965e4
Update the Qubino Flush Shutter fixture (#54387) 2021-08-10 10:31:55 -04:00
Joakim Sørensen d1ea38e8f0
Add 100% test coverage for Uptime Robot (#54314)
* Add 100% test coverage for Uptime Robot

* Update tests/components/uptimerobot/test_binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add more typehints

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-10 16:29:51 +02:00
Joakim Sørensen cf8f27bb44
Adjust version tests (#54391)
* Adjust version tests

* patch local import
2021-08-10 15:03:34 +02:00
Joakim Sørensen 8cb3a485e0
Fix Canary sensor state (#54380) 2021-08-10 09:19:28 +02:00
Paulus Schoutsen 38a7bdbcf3
Do not process forwarded for headers for cloud requests (#54364) 2021-08-10 01:45:56 +02:00
Joakim Sørensen d80da944a3
Version sensor entity cleanup (#53915)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-08-10 01:24:18 +02:00
J. Nick Koston 25f3cdde50
Add powerwall import and export sensors (#54018)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-08-09 16:03:22 -07:00
Richard T. Schaefer 3184f0697f
Add Save Persistent States service (#53881) 2021-08-10 00:38:56 +02:00
J. Nick Koston 74a30af79b
Always set interfaces explicitly when IPv6 is present (#54268) 2021-08-09 21:13:55 +02:00
starkillerOG a23da30c29
Yeelight local push updates (#51160)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-09 13:33:34 -05:00
Diogo Gomes b88f0adbe9
Restores unit_of_measurement (#54335) 2021-08-09 19:48:01 +02:00
Chris 188919f079
Clean up zwave_js RGB code (#54336) 2021-08-09 18:45:12 +02:00
Franck Nijhof 1c7891fbee
Remove deprecated YAML configuration from Growatt (#54325) 2021-08-09 14:54:42 +02:00
Raman Gupta c79ee53ab1
Use dict for zwave_js siren.available_tones (#54305)
* Use dict for zwave_js siren.available_tones

* update siren.turn_on service description
2021-08-09 13:29:17 +02:00
Chris 3742333a89
Remove zwave_js transition on individual color channels (#54303) 2021-08-09 13:21:41 +02:00
jan iversen 9b7b787fe4
Remove icon where device_class is defined. (#54323) 2021-08-09 13:13:11 +02:00
jan iversen 6ea50823c1
Use SensorEntityDescription for arlo (#54223)
* Use SensorEntityDescription.
2021-08-09 12:16:35 +02:00
jan iversen e7f0768ae6
Convert base_config_test in modbus to existing Pytest.fixture (#53836)
* Convert base_config_test to pytest.fixture.
2021-08-09 12:11:54 +02:00
Raman Gupta 2e903c92c4
Add siren support for available tones provided as a dict (#54198)
* Add siren support for available tones provided as a dict

* remove paranthesis

* hopefully make logic even easier to read

* drop last parenthesis
2021-08-09 00:41:51 -04:00
Paulus Schoutsen 557cc792e9
Fix SQLAlchemy test warnings (#54116) 2021-08-08 20:33:47 -07:00
Allen Porter 160bd74bae
Update DeviceInfo static types (#54276)
* Update nest static types from aditional PR feedback

Update nest and device helper static types based on post-merge discussion in PR #53475

* Remove unused type: ignore in synology

* Remove check for None device type

Remove check for None device type in order to reduce untested code as this is
a case not allowed by the nest python library.
2021-08-08 19:24:36 -07:00
Joakim Sørensen 89bb95b0be
Add re-authentication to Uptime Robot (#54226)
* Add reauthentication to Uptime Robot

* Fix en strings

* format

* Fix docstring

* Remove unused patch

* Handle no existing entry

* Handle account mismatch during reauthentication

* Add test to validate reauth is triggered properly

* Test reauth after setup

* Adjust tests

* Add full context for reauth init
2021-08-08 15:41:05 +02:00
rjulius23 7d29eb282b
Add enumerate to builtins in python_script component (#54244) 2021-08-07 22:02:20 -07:00
Dermot Duffy 75726a2695
Don't block motionEye setup on NoURLAvailableError (#54225)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-07 21:29:52 -07:00
jan iversen 2232915ea8
Add parameter to delay sending of requests in modbus (#54203) 2021-08-07 21:10:08 -07:00
Niccolo Zapponi 483a4535c8
Handle software version being None when setting up HomeKit accessories (#54130)
* Convert all HomeKit service info to string prior to checking for max length

* Added check for None software version

* Added test case for numeric version number

* Update tests/components/homekit/test_accessories.py

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

* Fix style & none version test

* Fix test

* revert other change since it should be covered by the format_sw_version fix

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-06 09:34:42 -07:00
Tom Brien d842fc288f
Ignore Coinbase vault wallets (#54133)
* Exclude vault balances

* Update option flow validation

* Update test name

* Add missed check

* Fix dangerous default
2021-08-06 09:34:21 -07:00
Raj Laud 2db278a7a7
Fix Squeezebox dhcp discovery (#54137)
* Fix Squeezebox dhcp discovery and allow ignore

* Test ignoring known Squeezebox players

* Fix linter errors
2021-08-06 09:29:52 -07:00
J. Nick Koston 5f790f6bd9
Fetch interface index from network integration instead of socket.if_nametoindex in zeroconf (#54152) 2021-08-06 09:15:35 -07:00
Matthias Alphart ab34ef475e
Test KNX binary sensor (#53820)
* test binary_sensor

* test binary_sensor with reset_after
2021-08-05 23:33:20 -05:00
Matthias Alphart 8ead20a76b
Test knx sensor (#54090) 2021-08-05 23:26:02 -05:00
J. Nick Koston adc9f75493
Increase time before scene and script HomeKit entities are reset (#54105) 2021-08-05 19:24:24 -07:00
J. Nick Koston 26cb588ee2
Handle empty software version when setting up HomeKit (#54068)
Fixes #54059 Fixes #54024
2021-08-05 10:47:14 -07:00
Joakim Sørensen 786a83f844
Add unique_id to Uptime Robot config_flow (#54055) 2021-08-05 14:58:29 +02:00
Milan Meulemans debcc6689f
Activate mypy for Cloudflare (#54041) 2021-08-05 13:01:12 +02:00
Gleb Sinyavskiy 25eb27cb9f
Add tractive integration (#51002)
* Scaffold

* Implement config flow

* Add dymmy device tracker and TractiveClient

* Add simple DeviceTracker

* Add device info

* Listen to tractive event and update tracker entities accordingly

* Refactoring

* Fix logging level

* Handle connection errors

* Remove sleep

* Fix logging

* Remove unused strings

* Replace username config with email

* Update aiotractive

* Use debug instead of info

* Cover config_flow

* Update .coveragerc

* Add quality scale to manifest

* pylint

* Update aiotractive

* Do not emit SERVER_AVAILABLE, properly handle availability

* Use async_get_clientsession

Co-authored-by:  Daniel Hjelseth Høyer <mail@dahoiv.net>

* Add @Danielhiversen as a codeowner

* Remove the title from strings and translations

* Update homeassistant/components/tractive/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Force CI

* Use _attr style properties instead of methods

* Remove entry_type

* Remove quality scale

* Make pyupgrade happy

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-08-05 12:47:42 +02:00
Joakim Sørensen 4a37ff2dda
Bump pyuptimerobot to 21.8.1 (#53995)
* Bump pyuptimerobot to 21.08.0

* pylint

* bump to 21.8.1

* Uppdate strings

* Update homeassistant/components/uptimerobot/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-05 12:13:47 +02:00
Joakim Sørensen caf0bdd5b9
Add config flow to uptimerobot (#53938) 2021-08-04 22:20:03 +02:00
Alex Henry b77335d6f9
Fix Panasonic Viera TV going unavailable when turned off (#53788) 2021-08-04 12:44:16 +02:00
Jan Bouwhuis 8f014361d4
Validate Number value before calling entity method (#52343)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-04 11:57:26 +02:00
Jan Bouwhuis 8299d0a7c3
Validate Select option before calling entity method (#52352)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-08-04 11:12:42 +02:00
Matt Zimmerman 515a47212e
Add target high/low temperatures to prometheus integration (#50071)
* add target high/low temperatures to prometheus integration

* use labels

* Revert "use labels"

This reverts commit 09c56d6359.

* fix naming

* tests

* cleanup

* use three separate metrics

* fix descriptions
2021-08-04 07:42:47 +02:00
Martin Hjelmare c959a0a484
Limit zwave_js meter sensor last reset (#53921) 2021-08-03 22:50:14 +02:00
J. Nick Koston df03cce471
Enforce maximum length for HomeKit characteristics (#53913) 2021-08-03 10:09:10 -07:00
Joakim Sørensen 56360feb9a
Stream API requests to the supervisor (#53909) 2021-08-03 16:48:22 +02:00
Jc2k 081b2d533b
Add support for Eve Degree's air pressure sensor (#53891) 2021-08-03 07:30:50 -05:00
Chris cfc5111561
Handle powerConsumption reports with null value (#53888) 2021-08-02 20:50:57 -07:00
Aidan Timson 18f4d125c3
System Bridge v2.3.0+ - Data from WebSocket (#53443)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-02 22:11:26 +02:00
Jc2k d414b58769
Fix watts unit for homekit_controller power sensors (#53877) 2021-08-02 10:47:11 -07:00
Joakim Sørensen c3d623a37e
Fix issue when data is None (#53875) 2021-08-02 19:35:11 +02:00
Michael b2725918b1
Fix TP-Link smart strip devices (#53799) 2021-08-02 09:47:54 -07:00
Joakim Sørensen 1c38e9168c
Add base energy analytics (#53855) 2021-08-02 09:46:07 -07:00
Michael bffa9f960d
Add state class measurement to all suitable sensors on Speedtest.net (#53693)
* Add state class measurement

* use tuple instead of list
2021-08-02 17:00:25 +02:00
Michael 4241c4ca5b
Fix crash when AVM FRITZ!SmartHome devices are unreachable (#53809) 2021-08-02 16:13:54 +02:00
Milan Meulemans 8ab3d9cc12
Use homeassistant.const instead of integration const for device_info ATTR_ (#53703) 2021-08-02 15:11:41 +02:00
Graham Rogers 4f96f05a75
Improve Universal media player toggle default behavior (#49395)
Before it could not be overridden and the default behavior meant nothing was called when all children were off, so it could not be used to turn on the media player. The new default behavior is to delegate to `turn_on` and `turn_off` instead, which is more likely to be the expected behavior.
2021-08-02 15:10:56 +02:00
J. Nick Koston 65c6943784
Bump HAP-python to 4.0.0 (#53780) 2021-08-02 15:08:32 +02:00
Joakim Sørensen da3419945c
Rename snapshot -> backup (#53851) 2021-08-02 11:07:21 +02:00
Jc2k 73bc62949b
Fix error in homekit_controller causing some entities to get an incorrect unique id (#53848) 2021-08-01 20:59:32 -07:00
Chris 8ac1f5d28a
Add energy consumption sensors to smartthings devices (#53759) 2021-08-01 20:35:03 -07:00
B-Hartley 736fb2e90d
ForecastSolar - power production now w not k w (#53797) 2021-08-01 15:01:34 -07:00
Michael da1a9bcbf0
Do not block setup of TP-Link when device unreachable (#53770) 2021-08-01 14:58:55 -07:00
Paulus Schoutsen 370799bd22
Revert "Improve light scene support for white mode (#53768)" (#53782)
This reverts commit 6ffe0f6405.
2021-07-30 21:10:32 -07:00
Paulus Schoutsen 90cf94bb30
Bump Hue and only fire events for button presses (#53781)
* Bump Hue and only fire events for button presses

* Fix tests
2021-07-30 14:14:58 -07:00
Erik Montnemery 6ffe0f6405
Improve light scene support for white mode (#53768) 2021-07-30 12:47:26 -07:00
J. Nick Koston 72bd3f7128
Bump HAP-python to 3.6.0 (#53754) 2021-07-30 12:44:28 -07:00
Joakim Sørensen a9722c90e9
Revert "Rename snapshot -> backup" (#53751)
This reverts commit 9806bda272.
2021-07-30 12:44:10 -07:00
Tobias Sauerwein 8e61ed39fd
Fix flaky netatmo tests (#53644) 2021-07-30 20:07:23 +02:00
Diogo Gomes 028f6c4cac
fix flakky test (#53750) 2021-07-30 07:11:58 -07:00
epenet bb7236fd04
Use constants for device_info in Onewire integration (#53724) 2021-07-30 13:35:49 +02:00
Paulus Schoutsen 2cbcd5f2a9
Cost sensor handle consumption sensor in Wh (#53746) 2021-07-30 11:00:52 +02:00
epenet 87dab02ce6
Remove YAML configuration from onewire (#53728) 2021-07-29 22:12:00 -07:00
Michael 692665e46c
Apply left suggestions #53596 for TP-Link (#53737) 2021-07-29 22:11:15 -07:00
Michael 2b2cddb5f0
Extract smartthings switch energy attributes into sensors (#53719) 2021-07-29 21:50:02 -07:00
Robert Svensson edf0e0bd08
Add energy device class to deCONZ consumption sensors (#53731) 2021-07-29 16:16:08 -07:00
Martin Hjelmare 6d30e596ca
Fix zwave_js current and voltage meter sensor device class (#53723) 2021-07-29 14:26:57 -07:00
Paulus Schoutsen 6b7a4d2d3c
Revert "Allow uploading large snapshots (#53528)" (#53729)
This reverts commit cdce14d63d.
2021-07-29 14:26:05 -07:00
Martin Hjelmare 3c0e4b1fd9
Fix zwave_js meter sensor state class (#53716) 2021-07-29 12:25:43 -07:00
Martin Hjelmare 007ecc51e5
Revert "Add Automate Pulse Hub v2 support (#39501)" (#53704) 2021-07-29 11:58:48 -07:00
Michael 2b0b8736f2
Set state class measurement also for Total Energy for AVM Fritz!Smarthome devices (#53707) 2021-07-29 11:54:51 -07:00
Daniel Hjelseth Høyer 6590e464af
Integration. Add device class, last_reset, state_class (#53698)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-29 20:05:53 +02:00
Michael bedb9550f5
Move TP-Link power and energy switch attributes to sensors (#53596)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-07-29 11:02:47 -07:00
J. Nick Koston 219348d573
Skip each ssdp listener that fails to bind (#53670) 2021-07-29 18:07:52 +02:00
Raman Gupta 30cbf03b48
Add energy support for zwave_js meter CC entities (#53665)
* Add energy support for zwave_js meter CC entities

* shrink

* comments

* comments

* comments

* Move attributes

* Add tests

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-29 14:18:38 +02:00
Raman Gupta 1019ee22ff
Add enabled attribute to zwave_js discovery model (#53645)
* Add attribute to zwave_js discovery model

* Fix binary sensor entity enabled logic

* Add tests
2021-07-29 09:30:50 +02:00
Diogo Gomes a2d66bd1c0
Prosegur code quality improvements (#53647) 2021-07-28 22:15:28 -07:00
Stephen Beechen cdce14d63d
Allow uploading large snapshots (#53528)
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-07-28 22:12:59 -07:00
J. Nick Koston 6eb3307734
Fix invalid homekit state when arming (#53646)
- Maybe fixes #48538
2021-07-28 16:09:49 -07:00
Raman Gupta e1c6ccb198
Add zwave_js.reset_meter service (#53390)
* Add zwave_js.meter_reset service

* fix log statement

* Add endpoint attribute to service call and rename service

* Make service an entity service

* remove endpoint from service description
2021-07-28 23:15:27 +02:00
epenet 8d84edd3b7
Add renault integration (#39605) 2021-07-28 12:41:11 -07:00
stefano055415 3f7cc176a8
Add climate support to Freedompro (#52720)
* Update Freedompro

* fix code and add test

* add check for unsupported mode

* add code for unsupported hvac_mode

* HVAC_INVERT_MAP and fix test

* change params hass to session

* set const and add ValueError

* fix ValueError text
2021-07-28 19:27:31 +02:00
Matthias Alphart 4e4bb2e5a8
Test KNX events (#53433)
* test knx_event

* use async_capture_events
2021-07-28 19:04:11 +02:00
Bram Kragten 4df56bad9e
Remove currency from energy, use core config (#53615)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:49:55 -07:00
Maciej Bieniek 6d13466f8a
Remove unnecessary `init_integration()` call in NAM tests (#53609) 2021-07-28 11:23:57 +02:00
Allen Porter d58151034c
Combine some stream test mocks (#53600)
Combine MockFlushPart with the FakePyAvContainer since the container is
effectively a mock AvOutput. This simulates the behavior of the call to
mux and close that actually write to the memory file.
2021-07-28 10:20:51 +02:00
Marc Mueller 10bfc78365
Fix missing encoding with open() (#53593)
* Fix missing encoding with open()

* Fix tests

* Improve open - frontend
2021-07-28 09:41:45 +02:00
Allen Porter 1c20eb3263
Skip 'None' values when restoring climate scenes (#53484) 2021-07-28 09:16:23 +02:00
Richard T. Schaefer 9e219d9b6e
Add this variable for use by automation and script templates (#52774) 2021-07-28 09:09:13 +02:00
Franck Nijhof 1968b95829
Add currency core configuration (#53541)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Joakim Sørensen 85c1614204
Add currency to location data (#53575) 2021-07-27 21:05:16 -07:00
Marc Mueller 14c257e1b7
Use EntityDescription - melcloud (#53572)
* Use EntityDescription - melcloud

* Fix pylint errors

* Fix test

* Fix coverage exclude comments
2021-07-28 00:07:14 +02:00
Marc Mueller 3908aabc13
Use EntityDescription - climacell (#53573)
* Use EntityDescription - climacell

* Fix tests

* Fix coverage ignore comment
2021-07-27 23:47:29 +02:00
Joakim Sørensen 9806bda272
Rename snapshot -> backup (#51629) 2021-07-27 22:43:05 +02:00
Diogo Gomes 7ad7cdad3d
Add Prosegur Alarms (#44679)
Co-authored-by: Franck Nijhof <frenck@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 22:19:58 +02:00
Paulus Schoutsen f71980a634
Create stats for all sensors that have % unit and are measurement (#53576) 2021-07-27 21:56:34 +02:00
Ron Klinkien 3488053648
Remove garmin_connect integration (#52808)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 21:49:49 +02:00
Simone Chemelli 5a6be2370b
Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 3 (#53424) 2021-07-27 21:19:29 +02:00
Matthew Gottlieb 37c841956f
Allow removing workday holidays by name (#52700) 2021-07-27 20:28:04 +02:00
Martin Hjelmare a133eae88e
Add more mysensors sensor attributes (#53566) 2021-07-27 19:48:37 +02:00
Yuxiang Zhu ce663f629c
Fix various zeroconf IPv6 compatibility issues (#53505) 2021-07-27 19:31:51 +02:00
Maciej Bieniek 9607864c29
Bump `gios` library to version 2.0 (#53557)
* Bump gios library

* Fix pylint error
2021-07-27 19:10:38 +02:00
J. Nick Koston 84a7a5fd32
Split color temp and color into separate HomeKit services when a light supports both (#53471) 2021-07-27 10:10:05 -07:00
Allen Porter 022ba31999
Refactor the logic for peeking into the start of the stream (#52699)
* Reset dts validator when container is reset

* Reuse existing dts_validator when disabling audio stream

* Refactor peek logic at the start of a stream

Add a PeekingIterator to support rewinding an iterator so that the code
for adjusting audio streams and start pts can be inlined in the worker.

* Simplification and readability improvements

* Remove unnecessary verbiage from comments and pydoc

* Address pylint errors

* Remove rewind function and just mux the first packet separately

* More cleanup after removing rewind()

* Skip check to self._buffer on every iteration
2021-07-27 08:53:42 -07:00
gjong 9f495fd200
Add initial version for the YouLess integration (#41942)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 17:42:15 +02:00
jjlawren 214920f486
Ignore Sonos Boost devices during discovery v2 (#53358) 2021-07-27 09:50:46 -05:00
Franck Nijhof d4d791e0a1
Ensure Jewish Calendar returns an iso formatted timestamp (#52722) 2021-07-26 20:23:25 -07:00
Marc Mueller 3e08e50050
Use EntityDescription - nws (#53523)
* Use EntityDescription - nws

* Bugfix

* Bugfix 2
2021-07-27 01:46:01 +02:00
Allen Porter 6376b4be5c
Increase static type coverage for nest integration (#53475)
Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 01:43:52 +02:00
Jc2k 1681bbe5a5
Make sure that vocolinc flowerbud humidity sensor is exposed (via homekit_controller) (#53518)
* Make sure that vocolinc flowerbud humidity sensor is exposed

* Was a no-op to request these from humidifier, so remove them

* Fix typo
2021-07-26 16:11:27 -05:00
Anton Tolchanov 80aaebb761
Rename Prometheus metrics to conform with naming guidelines (#50156) 2021-07-26 20:52:30 +02:00
Paulus Schoutsen 962ddf664c
Add country code to co2signal state attributes (#53512) 2021-07-26 11:10:39 -07:00
Bram Kragten fcc6ea7497
Add energy integration (#52001)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2021-07-26 09:37:37 -07:00
Raman Gupta 4b189bd8c5
Add zwave_js WS API commands to get statistics (#53393)
* Add zwave_js WS API commands to get statistics

* update function name

* move nested functions to top level functions
2021-07-26 11:59:16 -04:00
Eric Severance a6331d85ed
Support energy/power sensors in the WeMo component (#53419) 2021-07-26 08:50:22 -07:00
Jc2k 9a000a1183
Support controlling Flowerbud spray level via homekit_controller (#53493) 2021-07-26 10:46:36 -05:00