Commit Graph

9171 Commits (b3b9fb0a7ca75cfb4ed3d53369fb9e9bdc589f2b)

Author SHA1 Message Date
Paulus Schoutsen c8f584f4ef
Validate requirements format in hassfest (#55094)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-08-24 08:51:07 +02: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 e92e206544
Fix race that allowed multiple config flows with the same unique id (#55131)
- If a config flow set a unique id and then did an await to
  return control to the event loop, another discovery with
  the same unique id could start and it would not see
  the first one because it was still uninitialized. We now
  check uninitialized flows when setting the unique id
2021-08-23 23:01:21 -05: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
J. Nick Koston 0403ea715e
Add known devices to USB Vendor / Product IDs (#54986)
Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-21 21:56:49 +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
jan iversen 1e3452496a
Make log rollover at startup (#54865)
* Secure log rollover at startup.

* Review comments.

* Please CI.
2021-08-20 17:59:10 +02:00
J. Nick Koston 725b316ec6
Add HomeKit and DHCP to DISCOVERY_SOURCES in config_entries (#54923) 2021-08-20 17:02:03 +02: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
Raman Gupta 036e99e91e
Allow integrations to define trigger platforms with a subtype (#54861) 2021-08-19 21:43:04 -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
Martin Hjelmare a1abd4f0d6
Fix external internal url core check (#54310) 2021-08-09 10:52:14 +02:00
Paulus Schoutsen 952d11cb03
Ensure internal/external URL have no path (#54304)
* Ensure internal/external URL have no path

* Fix comment typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +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