EDIT: Nevermind, it was another automation that was also being triggered at the same time.
Hello all.
I am trying to save current light state a scene and then revert it after some time. Everything works as it should except, when scene.create gets called, the lights turn ON to full brightness then go to the brightness specified in the following step.
Here is my automation. It:
- Checks whether the time is between sunset and 10PM
- Triggers off of an Aquara motion sensor
- Saves current light settings to a scene
- Sets lights to 50% brightness - this is a Shelly RGBW2 WiFi LED controller and an Ikea Zigbee bulb.
I have another automation that turns off the lights after a delay and this second automation works just fine.
Here is the problem code (I put in a 5 second delay to see where exactly the brightness jump occurs. It happens just before the delay):
id: '1624798557631'
alias: Kitchen Under Cabinet lights - Presense during twilight
description: ''
trigger:
- type: motion
platform: device
device_id: 28e635311ee275ceca4e7838b750c00c
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
domain: binary_sensor
condition:
- condition: and
conditions:
- condition: sun
after: sunset
- condition: time
before: '22:00'
action:
- data:
scene_id: kitchenlights_state_twilight
snapshot_entities: light.kitchen_accent_lights
service: scene.create
- delay:
hours: 0
minutes: 5
seconds: 1
milliseconds: 0
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id:
- light.kitchen_accent_lights
mode: single
and here is Tasmota console log:
03:16:13.090 SRC: MQTT
03:16:13.092 CMD: Grp 0, Cmnd 'BACKLOG', Idx 1, Len 18, Data 'NoDelay;Dimmer 100'
03:16:13.099 SRC: Backlog
03:16:13.102 CMD: Grp 0, Cmnd 'DIMMER', Idx 1, Len 3, Data '100'
03:16:13.110 MQT: stat/tasmota_FCD810/RESULT = {"POWER":"ON","Dimmer":100,"Color":"000000FF","HSBColor":"0,0,0","White":100,"Channel":[0,0,0,100]}
03:16:13.826 CFG: Saved to flash at F4, Count 1326, Bytes 4096
03:16:18.035 SRC: MQTT
03:16:18.038 CMD: Grp 0, Cmnd 'BACKLOG', Idx 1, Len 17, Data 'NoDelay;Dimmer 50'
03:16:18.044 SRC: Backlog
03:16:18.046 CMD: Grp 0, Cmnd 'DIMMER', Idx 1, Len 2, Data '50'
03:16:18.055 MQT: stat/tasmota_FCD810/RESULT = {"POWER":"ON","Dimmer":50,"Color":"00000080","HSBColor":"0,0,0","White":50,"Channel":[0,0,0,50]}
03:16:18.821 CFG: Saved to flash at FB, Count 1327, Bytes 4096
03:16:22.006 WIF: Checking connection...
03:16:27.404 MQT: tele/tasmota_FCD810/STATE = {"Time":"2021-06-28T03:16:27","Uptime":"0T00:25:10","UptimeSec":1510,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER":"ON","Dimmer":50,"Color":"00000080","HSBColor":"0,0,0","White":50,"Channel":[0,0,0,50],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"IoT","BSSId":"3C:84:6A:BC:65:54","Channel":1,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":1,"Downtime":"0T00:00:04"}}
03:16:27.452 MQT: tele/tasmota_FCD810/SENSOR = {"Time":"2021-06-28T03:16:27","Switch8":"OFF","ANALOG":{"CTEnergy":{"Energy":0.000,"Power":0,"Voltage":12,"Current":0.000}}}
As you can see, the lights first jump to 100% and then after a 5 second delay, jump down to 50%.
Where is this 100% brightness step coming from?