Skip to content

status topic for switch is not correctly published causing switch become unavailable in HA #34

@grayyang

Description

@grayyang

It is observed that switches become unabliable in HA after S1E device booted. From HA, it is observed that the status topic received NO message at all.

After further debugging, it seems that the device is producting different id for switches, in detail:

  • id 1, 2, 3 is used for ubus -S call switch state
  • id 33, 34, 35 is used for ubus -S call switch get.config

I think the same hack should be made in set_status function as the config_switch one, where the id for ubus -S call switch state is used to as the unique id of switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions