Commit Graph

33231 Commits (1444afbe5a0c2d023f4995ae366938e338233ee7)

Author SHA1 Message Date
Steven Rollason 08163a848c
Fix downloader path validation on subdir (#46061) 2021-02-06 14:05:50 +01:00
Marcel van der Veldt 242ff045b9
Handle missing value in all platforms of zwave_js (#46081) 2021-02-06 14:02:03 +01:00
Erik Montnemery fb68bf85ae
Don't defer formatting of log messages (#44873)
* Make fast logging optional

* Remove fast logging support
2021-02-06 13:40:15 +01:00
Robert Svensson 94ecb792ec
Use async_update_entry rather than updating config_entry.data directly in Axis (#46078)
Don't step version in migrate_entry to support rollbacking
2021-02-06 13:17:52 +01:00
J. Nick Koston a74ae3585a
Fix backwards compatiblity with fan update to new model (#45951)
* Fix backwards compatiblity with fans update to new model

There were some non-speeds and devices that report a none
speed. These problems were discovered when updating zha
tasmota and vesync to the new model in #45407

* Update coverage

* fix check
2021-02-06 12:48:18 +01:00
Erik Montnemery 369616a6c3
Exclude disabled rfxtrx entities from async_entries_for_device (#46102) 2021-02-06 12:19:41 +01:00
Raman Gupta af4e6f856f
Use better names for zwave_js platforms that are self describing (#46083)
* use better names for platforms that are self describing

* add missing light change

* fix tests

* only use value_name in sensors and binary_sensors
2021-02-06 12:08:25 +01:00
ehendrix23 ee98ea89dd
Bump aioharmony from 0.2.6 to 0.2.7 (#46075) 2021-02-05 23:55:21 -10:00
Erik Montnemery 8a7e0241ab
Fix race in script wait for trigger step (#46055)
* Fix race in script wait for trigger step

* Update script.py

* Update script.py
2021-02-06 10:01:30 +01:00
djtimca f2d9e6f70c
Add sensor platform for Aurora integration (#43148)
* Removed pylint disable on unused after updating CI files that were out of date.
* Pylint still fails due to bug on DOMAIN import. Added disable check.
* Addressed PR comments
* Added import for ClientError to test_config_flow.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-05 23:05:39 -08:00
HomeAssistant Azure ce159d7db3 [ci skip] Translation update 2021-02-06 00:07:22 +00:00
Raman Gupta 33169cf8cd
Fix zwave_js Notification CC sensors and binary sensors (#46072)
* only include property key name in sensor name if it exists

* add endpoint to binary_sensor and sensor notification CC entities if > 0

* refactor to have helper method generate name

* change default behavior of generate_name

* return value for notification sensor when we can't find the state

* store generated name
2021-02-05 23:36:42 +01:00
Franck Nijhof 67392338da
Activate manual ZHA config flow when no comports detected (#46077) 2021-02-05 17:23:47 -05:00
Robert Svensson 434b4dfa58
Improve deCONZ logbook to be more robust in different situations (#46063) 2021-02-05 23:07:12 +01:00
Sergio Conde Gómez 2c74befd4f
Fix foscam to work again with non-admin accounts and make RTSP port configurable again (#45975)
* Do not require admin account for foscam cameras.

Foscam cameras require admin account for getting the MAC address,
requiring an admin account in the integration is not desirable as
an operator one is good enough (and a good practice).

Old entries using the MAC address as unique_id are migrated to the
new unique_id format so everything is consistent.

Also fixed unhandled invalid responses from the camera in the
config flow process.

* Make RTSP port configurable again as some cameras reports wrong port

* Remove periods from new log lines

* Set new Config Flow version to 2 and adjust the entity migration

* Create a proper error message for the InvalidResponse exception

* Change crafted unique_id to use entry_id in the entity

* Abort if same host and port is already configured

* Fix entry tracking to use entry_id instead of unique_id

* Remove unique_id from mocked config entry in tests
2021-02-05 22:39:31 +01:00
functionpointer c01e01f797
MySensors config flow (#45421)
* MySensors: Add type annotations

Adds a bunch of type annotations that were created
while understanding the code.

* MySensors: Change GatewayId to string

In preparation for config flow.
The GatewayId used to be id(gateway).

With config flows, every gateway will have its own
ConfigEntry. Every ConfigEntry has a unique id.
Thus we would have two separate but one-to-one related ID systems.

This commit removes this unneeded duplication by using the id of the ConfigEntry
as GatewayId.

* MySensors: Add unique_id to all entities

This allows entities to work well with the frontend.

* MySensors: Add device_info to all entities

Entities belonging to the same node_id will now by grouped as a device.

* MySensors: clean up device.py a bit

* MySensors: Add config flow support

With this change the MySensors can be fully configured from the GUI.

Legacy configuration.yaml configs will be migrated by reading them once.
Note that custom node names are not migrated. Users will have to re-enter
the names in the front-end.
Since there is no straight-forward way to configure global settings,
all previously global settings are now per-gateway. These settings include:
- MQTT retain
- optimistic
- persistence enable
- MySensors version

When a MySensors integration is loaded, it works as follows:
1. __init__.async_setup_entry is called
2. for every platform, async_forward_entry_setup is called
3. the platform's async_setup_entry is called
4. __init__.setup_mysensors_platform is called
5. the entity's constructor (e.g. MySensorsCover) is called
6. the created entity is stored in a dict in the hass object

* MySensors: Fix linter errors

* MySensors: Remove unused import

* MySensors: Feedback from @MartinHjelmare

* MySensors: Multi-step config flow

* MySensors: More feedback

* MySensors: Move all storage in hass object under DOMAIN

The integration now stores everything under hass.data["mysensors"]
instead of using several top level keys.

* MySensors: await shutdown of gateway instead of creating a task

* MySensors: Rename Ethernet to TCP

* MySensors: Absolute imports and cosmetic changes

* MySensors: fix gw_stop

* MySensors: Allow user to specify persistence file

* MySensors: Nicer log message

* MySensors: Add lots of unit tests

* MySensors: Fix legacy import of persistence file name

Turns out tests help to find bugs :D

* MySensors: Improve test coverage

* MySensors: Use json persistence files by default

* MySensors: Code style improvements

* MySensors: Stop adding attributes to existing objects

This commit removes the extra attributes that were being
added to the gateway objects from pymysensors.

Most attributes were easy to remove, except for the gateway id.
The MySensorsDevice class needs the gateway id as it is part of its DevId
as well as the unique_id and device_info.
Most MySensorsDevices actually end up being Entities.
Entities have access to their ConfigEntry via self.platform.config_entry.

However, the device_tracker platform does not become an Entity.
For this reason, the gateway id is not fetched from self.plaform but
given as an argument.

Additionally, MySensorsDevices expose the address of the gateway
(CONF_DEVICE). Entities can easily fetch this information via self.platform,
but the device_tracker cannot. This commit chooses to remove the gateway
address from device_tracker. While this could in theory break some automations,
the simplicity of this solution was deemed worth it.
The alternative of adding the entire ConfigEntry as an argument to MySensorsDevices
is not viable, because device_tracker is initialized by the async_setup_scanner function
that isn't supplied a ConfigEntry. It only gets discovery_info.
Adding the entire ConfigEntry doesn't seem appropriate for this edge case.

* MySensors: Fix gw_stop and the translations

* MySensors: Fix incorrect function calls

* MySensors: Fewer comments in const.py

* MySensors: Remove union from _get_gateway and remove id from try_connect

* MySensors: Deprecate nodes option in configuration.yaml

* MySensors: Use version parser from packaging

* MySensors: Remove prefix from unique_id and change some private property names

* MySensors: Change _get_gateway function signature

* MySensors: add packaging==20.8 for the version parser

* MySensors: Rename some stuff

* MySensors: use pytest.mark.parametrize

* MySensors: Clean up test cases

* MySensors: Remove unneeded parameter from devices

* Revert "MySensors: add packaging==20.8 for the version parser"

This reverts commit 6b200ee01a.

* MySensors: Use core interface for testing configuration.yaml import

* MySensors: Fix test_init

* MySensors: Rename a few variables

* MySensors: cosmetic changes

* MySensors: Update strings.json

* MySensors: Still more feedback from @MartinHjelmare

* MySensors: Remove unused strings

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

* MySensors: Fix typo and remove another unused string

* MySensors: More strings.json

* MySensors: Fix gateway ready handler

* MySensors: Add duplicate detection to config flows

* MySensors: Deal with non-existing topics and ports.

Includes unit tests for these cases.

* MySensors: Use awesomeversion instead of packaging

* Add string already_configured

* MySensors: Abort config flow when config is found to be invalid while importing

* MySensors: Copy all error messages to also be abort messages

All error strings may now also be used as an abort reason,
so the strings should be defined

* Use string references

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-05 22:13:57 +01:00
Robert Svensson 0d620eb7c3
Add unique id to UniFi config entries using the unique id of the site it is controlling (#45737)
* Add unique id to UniFi config entries using the unique id of the site it is controlling

* Fix failing test
2021-02-05 19:38:08 +01:00
Marc Mueller 55f9d98523
Fix deprecated method isAlive() (#46062) 2021-02-05 19:12:23 +01:00
Johan Nenzén 55f81a8a04
Address Plaato post merge review (#46024) 2021-02-05 18:28:06 +01:00
Robert Svensson ae2c7e4c74
Improve UniFi tests (#45871) 2021-02-05 16:31:47 +01:00
Jaroslav Hanslík 7144c5f316
Fix demo number entity (#45991) 2021-02-05 15:08:28 +01:00
tkdrob 6fdb12c09d
Use core constants for bluetooth_tracker (#46041) 2021-02-05 15:07:17 +01:00
tkdrob 9a570d7c32
Use core constants for bmw_connected_drive (#46042) 2021-02-05 08:02:28 -05:00
Greg Dowling e01ca40d56
Force Vera refresh after starting subscription (#46001)
* Force vera refresh after starting subscription.

* Request refresh on device load.

* Update init test.
2021-02-05 13:20:15 +01:00
Yuval Aboulafia 2a0c36589f
Centralize some Airly constants (#45985) 2021-02-05 12:41:36 +01:00
tkdrob 725dcb5cac
Use core constants for doods (#46043) 2021-02-05 12:17:46 +01:00
Aaron Bach 6404f91d00
Standardize AirVisual helper method in config flow (#45999)
* Standardize AirVisual helper method in config flow

* Code review
2021-02-05 10:51:55 +01:00
Nathan Spencer 92886cafe9
Fix zwave_js cover control for Up/Down and Open/Close (#45965)
* Fix issue with control of cover when the target value is Up/Down instead of Open/Close

* Adjust open/close/stop cover control to account for no Open/Up or Close/Down targets

* Revert back to using values of 0/99 to close/open a cover since it is supported by all covers

* Replace RELEASE_BUTTON with False and remove unused PRESS_BUTTON in zwave_js cover
2021-02-05 10:48:47 +01:00
tkdrob 2b17ba1dc4
User core constants for deutsche_bahn (#46028) 2021-02-05 10:29:59 +01:00
tkdrob 6e9aa254d5
Use core constants for delijn (#46027) 2021-02-04 21:43:04 -05:00
tkdrob bcefbe2dca
Use core constants for automation (#46016) 2021-02-04 21:41:43 -05:00
J. Nick Koston 374aa3aee1
Fix homekit options not being prefilled (#45926)
* Fix homekit options not being prefilled

When changing homekit options, the existing ones
were not being prefilled on the form.

* hide camera screen if no cameras
2021-02-05 02:39:07 +01:00
obelix05 d1b7d25a5d
Prevent fritzbox callmonitor phonebook_id 0 from being ignored (#45990) 2021-02-05 02:31:47 +01:00
HomeAssistant Azure c6bd5b1b71 [ci skip] Translation update 2021-02-05 00:03:54 +00:00
J. Nick Koston 01e73911d6
Do not listen for dhcp packets if the filter cannot be setup (#46006) 2021-02-05 00:36:55 +01:00
Fabian Affolter 097a4e6b59
Upgrade praw to 7.1.2 (#46012) 2021-02-04 23:42:10 +01:00
Fabian Affolter 62de921422
Upgrade slixmpp to 1.7.0 (#46019) 2021-02-04 23:41:24 +01:00
J. Nick Koston b9f9de0c1d
dhcp does not need promisc mode. Disable it in scapy (#46018) 2021-02-04 23:39:44 +01:00
tkdrob 60268e63d9
Use core constants for aws (#46017) 2021-02-04 23:36:35 +01:00
tkdrob 5d3dcff7c9
Use core constants for asuswrt (#46015) 2021-02-04 23:34:39 +01:00
Fabian Affolter c7febacd9f
Upgrade holidays to 0.10.5.2 (#46013) 2021-02-04 23:32:56 +01:00
Martin Hjelmare 912b816117
Bump zwave-js-server-python to 0.17.2 (#46010) 2021-02-04 20:44:40 +01:00
DeadEnd 7b280bdbe7
Fix Local Media in Media Browser (#45987)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-04 17:02:56 +01:00
Joakim Sørensen 56b8e82a69
Bump awesomeversion from 21.2.0 to 21.2.2 (#45993) 2021-02-04 16:45:59 +01:00
Martin Hjelmare b80c1688ad
Bump zwave-js-server-python to 0.17.1 (#45988) 2021-02-04 16:29:41 +01:00
Martin Weinelt 61a987061e
Don't log missing mpd artwork inappropriately (#45908)
This can get unnecessarily spammy and doesn't represent an actual
actionable issue.

Fixes: #45235
2021-02-04 08:18:51 -05:00
Maciej Bieniek 134b1d3f63
Fix entities device_info property in Harmony integration (#45964) 2021-02-04 08:16:09 -05:00
Joakim Sørensen 1a74709757
Throw error in hassfest when integration is missing version (#45976) 2021-02-04 13:31:17 +01:00
tkdrob 9c6c2a77ab
Use core constants for amazon polly (#45938) 2021-02-04 07:06:09 -05:00
tkdrob d44c941efe
Use core constants for alexa (#45937) 2021-02-04 07:05:56 -05:00