8000 Implement smart actions (smartlife.iot.sensor_trigger) · Issue #456 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content
Implement smart actions (smartlife.iot.sensor_trigger) #456
Open
@rytilahti

Description

@rytilahti

Some devices support device-based triggers which are not currently implemented by this library.

For example:

It might be worth mentioning that the offending default rule is one of what TP-Link calls "Smart Control" rules, which are managed by the smartlife.iot.sensor_trigger module. The following command will probably delete the offending rule:

{"smartlife.iot.sensor_trigger": {"delete_weekday_routine": {"id": "0"}}}

Note, to really do it properly, you shouldn't assume that the id of the rule will be "0". Instead, you should call get_weekday_routine and iterate over the returned array to find the id of each existing rule, which you can then pass in turn to delete_weekday_routine. On my KS200M, the one allowed Smart Control rule is always given "id": "0", but that seems to be an anomaly, as all other rule sets in the Kasa API (that I've encountered at least) use random hex strings as rule identifiers.

Originally posted by @whitslack in #453 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0