Fix Tuya Covers without state in their control data point (#66564)

pull/66624/head
Franck Nijhof 2022-02-15 15:25:36 +01:00 committed by Paulus Schoutsen
parent addc6bce63
commit 8b39866bb7
1 changed files with 4 additions and 1 deletions

View File

@ -158,7 +158,10 @@ async def async_setup_entry(
device = hass_data.device_manager.device_map[device_id]
if descriptions := COVERS.get(device.category):
for description in descriptions:
if description.key in device.status:
if (
description.key in device.function
or description.key in device.status_range
):
entities.append(
TuyaCoverEntity(
device, hass_data.device_manager, description