Add fan platform to ozw component (#35249)
* Add fan platform * Add fan discovery schema * Use constants for dispatcher signal * Move fan platform to ozw * Fix fan discovery schema * Add previous speed to handle value 255 * Make fixture reading more robust * Add fan tests * Remove not needed fixture info * Validate speed Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
1 parent
59c112a3f2
commit
ca1e643bdc
8 files changed
+341
-1
No files matched your search
@@ -32,7 +32,10 @@ async def setup_ozw(hass, entry=None, fixture=None):
|
||||
|
||||
if fixture is not None:
|
||||
for line in fixture.split("\n"):
|
||||
topic, payload = line.strip().split(",", 1)
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
topic, payload = line.split(",", 1)
|
||||
receive_message(Mock(topic=topic, payload=payload))
|
||||
|
||||
await hass.async_block_till_done()
|
||||
|
||||
Reference in new issue
Block a user