8000 Add `set_cold_time` to Motion module · Issue #452 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Add set_cold_time to Motion module #452

@whitslack

Description

@whitslack

The PIR motion sensor module in the KS200M (and probably in the KS220M as well) can have its inactivity timeout changed. My KS200M came from the factory preset to 60 seconds, but the timeout is configurable. You might want to add support for this to your library.

{"smartlife.iot.PIR":{"set_cold_time":{"cold_time":60000}}}

{"smartlife.iot.PIR":{"set_cold_time":{"err_code":0}}}

60 seconds appears to be the maximum. The switch will accept larger values and will return them from get_config for a while but eventually will revert back to 60 seconds. EDIT: This was happening because the switch comes preconfigured with a Smart Control rule that changes the cold time to 60 seconds. After I deleted that rule, my adjustment to the cold time sticks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0