Closed ghost closed 2 years ago
Same applies to Shelly i3 devices. I think it's because the input topics have been changed in #216, as a result the topic of the binary_sensor is something like shellies/shelly-i3-hal/~input/0 which does not exist. The ~ should not be there.
This should be fixed in 0.43.1. Please run announce automation, restart HA and check once again.
Both 1PMs still not working after announce and HA reboot (and Shelly reboot, just to be safe). The input states are still changing in the shellies MQTT topics but not in the homeassistant ones.
I just tried something. With version 0.43.0 the 1PMs work, but the i3 and Button 1s don't. With version 0.43.1 the i3 and Button 1s work again, but the 1PMs fail.
I tested 1PM, i3 and Button1 with 0.43.1 and all topics are correct. You have to run the announce automation to fix the problem.
Just tried the announce automation again without success. The 1PMs switch input states still don't work with 0.43.1. When rolling back to 0.42.9 and 0.43.0 they work as expected. As soon as the 0.43.1 is in use they don't - even after announce automation, reboot and so on.
Debug log for python_script please
debug.log Log after triggering announce automation and turning switch on and off (switch in detached mode).
I don't see any problem in the log.
In the shellies 1PM input 0 mqtt topic the state changes from 0 to 1 as expected. In HA it stays off permanently.
I think, i've got it. The homeassistant mqtt topic for the 1PM has the following config payload:
{"name": "Shelly 1PM E8DB84D33B11 Input 0", "stat_t": "input/0", "avty_t": "~online", "pl_avail": "true", "pl_not_avail": "false", "uniq_id": "shelly1pm-e8db84d33b11-input-0", "qos": 0, "dev": {"cns": [["mac", "e8:db:84:d3:3b:11"]], "name": "Shelly 1PM E8DB84D33B11", "mdl": "Shelly 1PM", "sw": "20211109-130756/v1.11.7-g682a0db", "mf": "Allterco Robotics", "cu": "http://192.168.178.33/"}, "~": "shellies/shelly1pm-E8DB84D33B11/", "pl_on": "1", "pl_off": "0"}
If I change "input/0" to "~input/0" by publishing it manually, the entity works again - until the topic is updated.
Closed via https://github.com/bieniu/ha-shellies-discovery/pull/221
@Eyco1981 Thanks for debugging
Confirmed that inputs for i3 work aswell after updating to 0.43.1. I was still on 0.43.0, shame on me. Thanks a lot for writing this script and support!
0.43.2 released, please update.
Describe the bug Missing input states for Shelly 1PM and device triggers not usable for input events.
Expected behavior Input states of Shelly 1PM updating when toggling the physical switch. Device triggers (input turned on/off) usable in automations.
Versions:
Shellies Discovery automation: