Hello everyone!
I just started with the Home Assistant, and i am having some trouble on getting this automation working.
I want to make some automations that:
1- With a single press i can toggle on/off my light.
2- Rotating right, i want to increase the light’s brightness, based on steps rotated.
3- Rotating left, i want to decrease the light’s brightness, based on steps rotated.
4- Rotate (pressing) right, i want to increase the light’s temperature, based on steps rotated.
5- Rotate (pressing) left, i want to decrease the light’s temperature, based on steps rotated.
As mentioned, i am fairly new to the HA world, and i’m already having some issues with the first one hahaha
this is the automation.yaml for the # 1, that does not work:
- id: '1634841412504'
alias: Dimmer e Luminária
description: ''
trigger:
- platform: state
entity_id: sensor.ble_dimmer_dimmer
attribute: last type of press
to: short press
condition: []
action:
- type: toggle
device_id: 95e57c60dfca42d55577c7e968b777fc
entity_id: light.luminaria
domain: light
mode: single
I am sure that the attribute’s stat is right, as i just confirmed on my devices, on the sensor’s attributes:
sensor type: YLKG07YL/YLKG08YL
mac address: xxxxxx #MAC is ok
last packet id: 108
firmware: Xiaomi (MiBeacon V3 encrypted)
dimmer value: 1
last type of press: short press
rssi: -59
friendly_name: Estado Dimmer
icon: mdi:rotate-right
and also, with the integration’s documentations, the “last type of press” can receive the respective values:
1- short press
2- long press
3- rotate right
4- rotate left
5- rotate right (pressed)
6- rotate right (pressed)
and the “dimmer value” refers to the steps (when rotating) or the time pressed in seconds (long press).
if nothing is pressent, the entity sensor.ble_dimmer_dimmer resets to “no press” after one second.
Can someone help with what i am doing wrong, and how can i structure the following automations with this infos?
Thanks in advance!