Hi there, hope someone can help! I have several Shelly 1 devices operating lights without a problem. I also have 2 Shelly Dimmer 2 devices that I use to dim spotlights. For some reason the two sets of lights connected to the 2 separate dimmer devices switch on at 06:02 in the morning for no apparent reason and it’s not every day.
The logbook does not identify what triggered the device to switch on. I don’t have any rogue automations that may cause this.
I’m wondering if there is something in the code that is allowing this to happen.
This is my code for the 2 dimmers - the code is identical with the exception of the shelly device id!
- platform: mqtt
schema: template
name: "Office_inside"
state_topic: "shellies/shellydimmer2-XXXXXXX/light/0/status"
state_template: '{% if value_json.ison %} on {% else %} off {% endif %}'
command_topic: "shellies/shellydimmer2-XXXXXXX/light/0/set"
command_on_template: '{"turn": "on"{% if brightness is defined %}, "brightness": {{(brightness | float * 0.3882 + 1) | round(0)}}{% endif %}}'
command_off_template: '{"turn": "off"}'
brightness_template: '{{ (value_json.brightness | float * 2.55) | round(0) }}'