mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-19 00:22:20 +00:00
Add ADC Value to PIR Enabled Switches
- Add: ADC value reporting to PIR enabled switches, so that it may be used in polling automations. - Add: ADC trigger state value reporting, for simpler automations. - Add: Ability for features to use custom value parsers.
This commit is contained in:
@@ -133,7 +133,7 @@ async def feature(
|
||||
echo(f"{feat.name} ({name}): {feat.value}{unit}")
|
||||
return feat.value
|
||||
|
||||
value = ast.literal_eval(value)
|
||||
value = feat.parse_value(value, ast.literal_eval)
|
||||
echo(f"Changing {name} from {feat.value} to {value}")
|
||||
response = await dev.features[name].set_value(value)
|
||||
await dev.update()
|
||||
|
||||
Reference in New Issue
Block a user