Commit Graph

34366 Commits (338be8c70b9b38802beebbc89e21e530a2d9dead)

Author SHA1 Message Date
J. Nick Koston 6023105c6a
Do not load ignored or disabled integrations at startup (#48355)
config_entries.async_setup will skip ignored and disabled integrations
but bootstrap would still load them in memory even though they would
never be setup.
2021-03-29 13:06:44 +02:00
J. Nick Koston 1fb9008488
Include platform only integrations in the manifest list api (#48269) 2021-03-29 12:51:48 +02:00
Pim e2d3c0ea8f
Don't write 0 to next modbus register (#48378) 2021-03-29 12:45:44 +02:00
J. Nick Koston cb1b45d31a
Log the reason a config entry failed to setup (#48449)
If we pass a string to ConfigEntryNotReady or raise it from
another exception we now log the string passed or the
string generated by the original exception.

With #47201 this makes it easy for developers to still show
the reason why setup failed without having to worry about log
spam from additional attempts by rasing ConfigEntryNotReady
from the original exception.
2021-03-29 12:25:40 +02:00
mptei dd538bd291
Fix knx tests (#48407) 2021-03-29 12:17:54 +02:00
Erik Montnemery 0c6a1c29ec
Fix broken trace tests (#48458) 2021-03-29 10:06:22 +02:00
J. Nick Koston 564688af25
Fix template fan default speed count (#48389)
* Fix template fan default speed count

The default speed count was defaulting to 3 when percentage
was implemented instead of the documented value of 100

* Increase coverage

* remove unreachable code
2021-03-29 09:33:56 +02:00
J. Nick Koston 7063306cd8
Bump aiodiscover to 1.2.0 in for dhcp (#48456)
- Additional optimizations
2021-03-29 09:17:30 +02:00
J. Nick Koston 2796a58ead
Speed up bond setup with gather (#48454) 2021-03-29 08:58:48 +02:00
Erik Montnemery 14ef0531f0
Address review comments from trace refactoring PRs (#48288) 2021-03-29 08:09:14 +02:00
Paulus Schoutsen ee81869c05 Bump frontend to 20210328.0 2021-03-29 03:14:29 +00:00
HomeAssistant Azure 357dedf5ef [ci skip] Translation update 2021-03-29 00:04:31 +00:00
SukramJ cc38db6a89
Remove myself as codeowner of HomematicIP Cloud (#48437) 2021-03-28 19:18:59 -04:00
J. Nick Koston 47156151ab
Bump aiodiscover to 1.1.2 for dhcp (#48445) 2021-03-28 13:12:31 -10:00
J. Nick Koston a7d0fc2f86
Bump HAP-python to 3.4.1 for homekit (#48444) 2021-03-28 11:57:39 -10:00
Raman Gupta 08db248983
Fallback to current temperature unit for zwave_js climate (#48347)
* Fallback to current temperature unit for zwave_js climate

* don't use unit for N/A setpoint

* update comment

* add tests
2021-03-28 22:18:17 +02:00
J. Nick Koston 2ff94c8ed9
Add additional data source to dhcp (#48430) 2021-03-28 09:47:28 -10:00
David McClosky 23c7c4c977
Fallback to filename for title in vlc_telnet (#48438)
PR extracted from #44776.
2021-03-28 19:39:36 +02:00
David McClosky 48c0cfb25c
Detect when media position is stale in vlc_telnet (#48434)
PR extracted from #44776.
2021-03-28 18:19:05 +02:00
Robert Delpeut 4487565232
Add dsmr monthly and yearly totals (#48253)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-28 16:37:27 +02:00
David McClosky 70e3fc430c
Fix bug in vlc_telnet seeking (#48425)
Seems the code assumed a different `vlc_telnet` API.

Note that this doesn't address issues in `update()`, which will be
handled in a different PR.

PR extracted from #44776.
2021-03-28 11:58:11 +02:00
J. Nick Koston 958c4764f7
Handle routers that convert hostnames to lowercase in dhcp (#48429)
Some routers will lowercase all the hostnames. Since we
already lowercase hostnames for matching purposes, we now
pass the lowercased hostname to the integration.

Currently only roomba cared about this, and has been adjusted.
2021-03-28 11:23:06 +02:00
HomeAssistant Azure ce3e00d018 [ci skip] Translation update 2021-03-28 00:05:04 +00:00
Unai 0706ae70dc
Simplify maxcube integration (#48403)
* Simplify maxcube integration

Device objects returned by maxcube-api dependency are stable, so
we do not need to resolve from the device address every time.

Also, refactor and unify how maxcube integration sets temperature & mode.

* Raise ValueError if missing parameters for set_temperature method

Raise a ValueError exception If set_temperature does not receive
a temperature parameter.

Also, document properly _set_target method.

* Use Type | None instead of Optional[Type] annotation

* Protect set_hvac_mode and set_preset_mode from unsupported parameters
2021-03-28 00:21:20 +01:00
jan iversen ffdfc521b9
Allow discovery configuration of modbus platforms (#46591)
* Change modbus configuration to new style.

The old (frozen) configuration is still supported, but when detected a big
warning is issued that it will soon be removed. This allows users to change
their configuration at their pace.

Clean configuration SCHEMAs and move common modbus parts
to MODBUS_SCHEMA (renamed from BASE_SCHEMA).

Add BASE_COMPONENT_SCHEMA to ensure common configuration of components.
All component define e.g. NAME, move these to a common schema.
change components (binary_sensor, sensor, switch) to new config

Add test set for modbus itself (old config and discovery_info).
Add test of devices discovery_info configuration

* Update discovery_info configuration for binary_sensor.

* Update discovery_info configuration for sensor.

* Update discovery_info configuration for switch.

* Review comments.

* update due to change in core

* flake8 problem.

* Correct log message.

* add should_poll property.

* Fix polling for Modbus binary sensor

* Fix polling for Modbus sensor

* Fix polling for Modbus switch

* Fix switch.

* Fix pytest errors.

* Update homeassistant/components/modbus/binary_sensor.py

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

* Update homeassistant/components/modbus/binary_sensor.py

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

* Update homeassistant/components/modbus/modbus.py

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

* Update homeassistant/components/modbus/sensor.py

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

* Update homeassistant/components/modbus/sensor.py

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

* Update homeassistant/components/modbus/sensor.py

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

* Update homeassistant/components/modbus/switch.py

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

* Update homeassistant/components/modbus/switch.py

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

* Update homeassistant/components/modbus/switch.py

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

* ToogleEntity -> SwitchEntity and add abastract

* Update homeassistant/components/modbus/switch.py

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

* Update tests/components/modbus/test_init.py

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

* removed if/else in test.

* Remove other if.

Co-authored-by: Vladimir Zahradnik <vladimir@zahradnik.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-27 22:48:06 +01:00
Álvaro Fernández Rojas 23d7330a2f
Discard outdated data reported by AEMET stations (#48417)
* aemet: achieve 100% test coverage

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* aemet: discard outdated station data

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* aemet: fix AemetSensor/AemetForecastSensor inheritance

AbstractAemetSensor already inherits SensorEntity.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-03-27 22:33:24 +01:00
Matthias Alphart 051f29f9b6
Remove KNX type alias for homeassistant.core types (#48422) 2021-03-27 22:20:11 +01:00
David F. Mulcahey 3aa2591b0a
Bump ZHA quirks to 0.0.55 (#48418)
* bump quirks version

* call new setup method in quirks
2021-03-27 15:59:31 -04:00
J. Nick Koston 35a5f110bd
Update mac address in broadlink test to match mocked device (#48415)
* Update mac address in broadlink test to match mocked device

* Update tests/components/broadlink/test_config_flow.py
2021-03-27 20:47:47 +01:00
Jesse Campbell 67791fa4df
ZHA lock code services and events (#47208)
* ZHA lock code services and events

* ZHA Locks: A few more services, use the library functions

* Catch exception when command id is not in command list

* Add tests for lock code services

* Add tests for enable/disable

* Better document code slot ID shifting

* Simplify cluster commands
2021-03-27 15:23:40 -04:00
Christian Soltenborn 955804bf58
Add template support for remaining attributes of weather entity (#47736)
* added template support for remaining attributes of weather entity

* wind bearing is now angle (number)
2021-03-27 18:53:35 +00:00
J. Nick Koston 388815b81a
Add broadlink dhcp discovery (#48408) 2021-03-27 08:40:19 -10:00
Raman Gupta fbc3f97097
Add support for selective config parameter entity discovery (#48336)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-27 18:14:06 +01:00
conflipper 56abe25c1f
Add Ambient Station PM25 indoor sensor (#47970) 2021-03-27 18:01:33 +01:00
Jonathan Keslin 11596afdfc
Address late review of vesync light (#48130) 2021-03-27 17:50:35 +01:00
J. Nick Koston 938a4cc1b6
Bump yalexs to 1.1.9 (#48383)
* Bump yalexs to workaround pubnub reconnect bug

* bump to 1.1.9 to loosen version requirement for pubnub
2021-03-27 15:55:18 +01:00
Franck Nijhof cebcd7a202
Fix entity service calls on WLED master light (#48402) 2021-03-27 13:04:30 +01:00
Franck Nijhof 02182bfa86
Fix ability to ignore AdGuard hassio discovery (#48401) 2021-03-27 12:59:22 +01:00
Franck Nijhof 38d14702fa
Remove HomeAssistantType alias from helpers (#48400) 2021-03-27 12:55:24 +01:00
Unai 4a353efdfb
Add Maxcube unit tests (#47872)
* Simplify maxcube integration

Device objects returned by maxcube-api dependency are stable, so
we do not need to resolve from the device address every time.

Also, refactor and unify how maxcube integration sets temperature & mode.

* Add tests for maxcube component

* Use homeassistant.util.utcnow to retrieve current time

* Revert "Simplify maxcube integration"

This reverts commit 84d231d5bd.

* Make test pass again after rolling back integration changes
2021-03-27 12:42:23 +01:00
Franck Nijhof 0d595a2845
Merge of nested IF-IF cases - E-G (#48367) 2021-03-27 12:39:37 +01:00
Franck Nijhof 786023fce4
Merge of nested IF-IF cases - H-J (#48368) 2021-03-27 11:30:29 +01:00
Franck Nijhof db355f9b23
Merge of nested IF-IF cases - A-C (#48365) 2021-03-27 10:58:38 +01:00
Franck Nijhof 8d5ce53098
Merge of nested IF-IF cases - S-W (#48372) 2021-03-27 10:54:59 +01:00
Franck Nijhof 3aed84560f
Merge of nested IF-IF cases - O-R (#48371) 2021-03-27 10:38:57 +01:00
Ville Skyttä 3cd52b695d
Upgrade flake8 and dependencies, enable flake8-noqa (#48393)
* Upgrade flake8 to 3.9.0

https://flake8.pycqa.org/en/latest/release-notes/3.9.0.html

* Upgrade pydocstyle to 6.0.0

https://www.pydocstyle.org/en/latest/release_notes.html#september-13th-2020
https://www.pydocstyle.org/en/latest/release_notes.html#march-18th-2021

* Upgrade flake8-docstrings to 1.6.0, enable flake8-noqa

https://gitlab.com/pycqa/flake8-docstrings/-/blob/1.6.0/HISTORY.rst
https://github.com/plinss/flake8-noqa/issues/1

* Upgrade/pin pyflakes to 2.3.1

https://github.com/PyCQA/pyflakes/blob/2.3.1/NEWS.rst

* Pin pycodestyle to 2.7.0
2021-03-27 10:22:11 +01:00
Franck Nijhof 86212db71d
Merge of nested IF-IF cases - K-N (#48370) 2021-03-27 10:03:15 +01:00
J. Nick Koston 9737480742
Lazy load broadlink storage (#48391)
With many broadlink devices, the storage load overwhelmed the
executor at startup. Delay loading storage until it is needed.
2021-03-27 09:32:30 +01:00
Franck Nijhof 45f77ccccf
Merge of nested IF-IF cases - Core (#48364) 2021-03-27 09:23:32 +01:00
Franck Nijhof ad13a9295e
Merge multiple context managers in tests (#48146) 2021-03-27 09:17:15 +01:00