Protect entities for availability in gardena bluetooth (#96776)

Protect entities for availability
pull/96788/head
Joakim Plate 2023-07-17 21:12:24 +02:00 committed by GitHub
parent 31dfa5561a
commit 36cb3f7278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -90,6 +90,7 @@ async def async_setup_entry(
for description in DESCRIPTIONS
if description.key in coordinator.characteristics
]
if Valve.remaining_open_time.uuid in coordinator.characteristics:
entities.append(GardenaBluetoothRemainingOpenSetNumber(coordinator))
async_add_entities(entities)

View File

@ -60,6 +60,7 @@ async def async_setup_entry(
for description in DESCRIPTIONS
if description.key in coordinator.characteristics
]
if Valve.remaining_open_time.uuid in coordinator.characteristics:
entities.append(GardenaBluetoothRemainSensor(coordinator))
async_add_entities(entities)