Add switch support to the Flo integration (#38268)

* Add switch domain to Flo integration

* lint

* updates post rebase

* fix after rebase

* remove device state attrs

* oops

* stale name and docstring
This commit is contained in:
David F. Mulcahey authored and GitHub committed 2020-08-13 07:52:30 -04:00
1 parent 52a9921ed3
commit ca5e752514
7 files changed
+357 -1

No files matched your search

+16
View File
@@ -79,3 +79,19 @@ def aioclient_mock_fixture(aioclient_mock):
status=200,
headers={"Content-Type": "application/json"},
)
# Mocks the valve open call for flo.
aioclient_mock.post(
"https://api-gw.meetflo.com/api/v2/devices/98765",
text=load_fixture("flo/device_info_response.json"),
status=200,
headers={"Content-Type": "application/json"},
json={"valve": {"target": "open"}},
)
# Mocks the valve close call for flo.
aioclient_mock.post(
"https://api-gw.meetflo.com/api/v2/devices/98765",
text=load_fixture("flo/device_info_response_closed.json"),
status=200,
headers={"Content-Type": "application/json"},
json={"valve": {"target": "closed"}},
)