Skip to content

Instantly share code, notes, and snippets.

@squk
Last active September 15, 2021 02:43
Show Gist options
  • Select an option

  • Save squk/6103273bb041f720c39de9c54c849f4d to your computer and use it in GitHub Desktop.

Select an option

Save squk/6103273bb041f720c39de9c54c849f4d to your computer and use it in GitHub Desktop.
Aqara Cube Automation
- id: '1630438574517'
alias: Aqara Magic Cube
description: ''
use_blueprint:
path: Mikkelmoeller/aqara-magic-cube-zha-51-actions.yaml
input:
remote: daf96979b9e81cc754d2f78c27f179fc
cube_flip_90: []
cube_shake:
- service_template: "{%- if (states.climate.living_room_ac.state == 'off') -%}\n\
\ climate.turn_on\n{%- else -%}\n climate.turn_off\n{%- endif -%}\n"
data:
entity_id: climate.living_room_ac
flip_90: false
slide_any_side: true
flip_180: true
cube_flip_180:
- service: media_player.media_play_pause
target:
entity_id: media_player.nvidia_shield
rotate_right:
- choose:
- conditions:
- condition: state
entity_id: input_select.cube_side
state: tv
sequence:
- service: media_player.volume_up
data: {}
entity_id: media_player.receiver
- conditions:
- condition: state
entity_id: input_select.cube_side
state: lamp
sequence:
- service: script.living_room_lamp_up
- conditions:
- condition: state
entity_id: input_select.cube_side
state: fan
sequence:
- service: climate.set_temperature
target:
entity_id: climate.living_room_ac
data_template:
temperature: '{{ states.climate.living_room_ac.attributes.temperature
+ 1}}'
rotate_left:
- choose:
- conditions:
- condition: state
entity_id: input_select.cube_side
state: tv
sequence:
- service: media_player.volume_down
data: {}
entity_id: media_player.receiver
- conditions:
- condition: state
entity_id: input_select.cube_side
state: lamp
sequence:
- service: script.living_room_lamp_down
- conditions:
- condition: state
entity_id: input_select.cube_side
state: fan
sequence:
- service: climate.set_temperature
target:
entity_id: climate.living_room_ac
data_template:
temperature: '{{ states.climate.living_room_ac.attributes.temperature
- 1}}'
cube_drop:
- service: media_player.toggle
target:
entity_id: media_player.nvidia_shield
knock_any_side: true
one_to_two:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
three_to_two:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
- service: notify.persistent_notification
data:
message: LAMP
four_to_two:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
five_to_two:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
six_to_two:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
one_to_five:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
two_to_five:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
three_to_five:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
four_to_five:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
six_to_five:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: lamp
four_to_four: []
one_to_one: []
one_to_four:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
two_to_four:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
three_to_four:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
five_to_four:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
six_to_four:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
two_to_one:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
three_to_one:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
four_to_one:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
five_to_one:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
six_to_one:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: tv
one_to_three:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
two_to_three:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
four_to_three:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
five_to_three:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
six_to_three:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
one_to_six:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
two_to_six:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
three_to_six:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
four_to_six:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
five_to_six:
- service: input_select.select_option
target:
entity_id: input_select.cube_side
data:
option: fan
two_to_two: []
five_to_five: []
cube_knock_any:
- choose:
- conditions:
- condition: state
entity_id: input_select.cube_side
state: fan
sequence:
- service_template: "{%- if (states.climate.living_room_ac.state == 'off')\
\ -%}\n climate.turn_on\n{%- else -%}\n climate.turn_off\n{%- endif\
\ -%}\n"
data:
entity_id: climate.living_room_ac
- conditions:
- condition: state
entity_id: input_select.cube_side
state: tv
sequence:
- service: media_player.media_play_pause
target:
entity_id: media_player.nvidia_shield
- conditions:
- condition: state
entity_id: input_select.cube_side
state: lamp
sequence:
- service: script.living_room_lamp_power
default: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment