I have two automation like this:
- alias: switch_toggle_lamp_gostinaia
initial_state: true
trigger:
- platform: event
event_type: xiaomi_aqara.cube_action
event_data:
entity_id: binary_sensor.cube_158dXXXXXXXXX
action_type: shake_air
condition:
- condition: time
after: '07:00:00'
before: '00:00:00'
action:
- service: light.toggle
data:
entity_id: light.gostinaia
brightness_pct: 100
color_temp: 200
- alias: switch_toggle_lamp_gostinaia
initial_state: true
trigger:
- platform: event
event_type: xiaomi_aqara.cube_action
event_data:
entity_id: binary_sensor.cube_158dXXXXXXXX
action_type: shake_air
condition:
- condition: time
after: '00:00:00'
before: '07:00:00'
action:
- service: light.toggle
data:
entity_id: light.gostinaia
brightness_pct: 40
color_name: blue
How can I make the automation shorter, check the time directly in the action section, and change the brightness and color of my lamp there. I am just starting to master HA and still do not know everything, I would be grateful if you would help me.