1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add notification binary_sensor to Plugwise integration (#41473)

* Notifications extract from beta

* Remove info loggings

* Delete notification service

* Only notifications for right smiles

* Revert to correct logic

* Catchup with dev (mostly with ourselves from #41201)

* Remove debug logging

* Naming improvement

* Improve test quality as per codecov patch requirement

* Revert to original condition (and appropriately test)

* Fix delete_notification_service, bring tests fixtures up to 1.6.0 including notifications

* Review comment (@bouwew)

* Correct test value

* Re-apply #40108 fix after rebase sidestep

* Update tests/components/plugwise/test_init.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Add needed state to imports

* Remove separate gw unload code

* Change entry_fail approach

* Revert persistent notification part

* Revert persistent notification part - lint

* Update homeassistant/components/plugwise/binary_sensor.py

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

* Update homeassistant/components/plugwise/binary_sensor.py

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

* Rework reuse of sensor in binary_sensor

* Explicit state attribute keys

* Remove tempfile

* List of notifications per severity

* Update homeassistant/components/plugwise/binary_sensor.py

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

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Tom
2020-11-17 02:54:44 +01:00
committed by GitHub
parent c8113e6b11
commit ed36cb7beb
25 changed files with 152 additions and 32 deletions

View File

@@ -75,6 +75,8 @@ def mock_smile_adam():
smile_mock.return_value.smile_type = "thermostat"
smile_mock.return_value.smile_hostname = "smile98765"
smile_mock.return_value.notifications = _read_json(chosen_env, "notifications")
smile_mock.return_value.connect.side_effect = AsyncMock(return_value=True)
smile_mock.return_value.full_update_device.side_effect = AsyncMock(
return_value=True
@@ -118,6 +120,8 @@ def mock_smile_anna():
smile_mock.return_value.smile_type = "thermostat"
smile_mock.return_value.smile_hostname = "smile98765"
smile_mock.return_value.notifications = _read_json(chosen_env, "notifications")
smile_mock.return_value.connect.side_effect = AsyncMock(return_value=True)
smile_mock.return_value.full_update_device.side_effect = AsyncMock(
return_value=True
@@ -161,6 +165,8 @@ def mock_smile_p1():
smile_mock.return_value.smile_type = "power"
smile_mock.return_value.smile_hostname = "smile98765"
smile_mock.return_value.notifications = _read_json(chosen_env, "notifications")
smile_mock.return_value.connect.side_effect = AsyncMock(return_value=True)
smile_mock.return_value.full_update_device.side_effect = AsyncMock(
return_value=True