Argo
(Argo)
August 16, 2018, 8:09pm
1
Greetings!
Got aqara switches, playing with them a bit. There are two channels in my room, but I want to use one button for them, so I made a group (so I still can sometimes use just half of the lights).
But now left bulb icon does not fire when group is turned on.
How can I mannage that?
Have a nice day!
Tinkerer
(aka DubhAd on GitHub)
August 17, 2018, 8:37am
2
If those are actual light.
entities, use a light group .
Argo
(Argo)
August 18, 2018, 5:38am
3
They go like switches, because it is a wall switch.
Can I still do smth?
Tinkerer
(aka DubhAd on GitHub)
August 18, 2018, 8:31am
4
This should work work - by using a template switch . This assumes you’ve created a group group.my_aquara_switches
for those switches:
switch:
- platform: template
switches:
skylight:
value_template: "{{ is_state('group.my_aquara_switches', 'on') }}"
turn_on:
service: homeassistant.turn_on
entity_id: group.my_aquara_switches
turn_off:
service: homeassistant.turn_on
entity_id: group.my_aquara_switches
Argo
(Argo)
August 18, 2018, 12:05pm
5
Thank you for help. Unfortunately does not work yet (everything is the same). Here is my configuration.yaml
switch:
- platform: broadlink
host: 192.168.1.64
mac: '34:EA:34:42:EF:7E'
timeout: 15
switches:
a11_key:
command_on: 'sgD8AAgYCRgZCBgIGQgYCAkYCBkYCBkIGAgZCBkHGQgJGAgYCRgIGQgYCRgIGAkYGQcZCAn7CRgIGBkIGQcZCBkICBgJGBkIGAgZCBkIGAgZCAgYCRgIGQgYCRgIGAkYCBgZCBkICPwIGAkYGQgYCBkIGQgIGAkYGAgZCBkIGAgZCBkICBgJGAgYCRgIGQgYCRgIGBkIGQgI/AgYCRgZCBkHGQgZCAgYCRgZBxkIGQgZBxkIGQgIGAkYCBkIGAkYCBgJGAgYGQgZCAj8CRgIGBkIGQcZCBkICBgJGBkIGAgZCBkIGQgYCAkYCBgJGAgZCBgJGAgYCRgZBxkICQAF3AAAAAAAAAAAAAAAAA=='
command_off: 'sgD8AAgYCRgZCBgIGQgYCAkYCBkYCBkIGAgZCBkHGQgJGAgYCRgIGQgYCRgIGAkYGQcZCAn7CRgIGBkIGQcZCBkICBgJGBkIGAgZCBkIGAgZCAgYCRgIGQgYCRgIGAkYCBgZCBkICPwIGAkYGQgYCBkIGQgIGAkYGAgZCBkIGAgZCBkICBgJGAgYCRgIGQgYCRgIGBkIGQgI/AgYCRgZCBkHGQgZCAgYCRgZBxkIGQgZBxkIGQgIGAkYCBkIGAkYCBgJGAgYGQgZCAj8CRgIGBkIGQcZCBkICBgJGBkIGAgZCBkIGQgYCAkYCBgJGAgZCBgJGAgYCRgZBxkICQAF3AAAAAAAAAAAAAAAAA=='
friendly_name: 'Зал'
a14_key:
command_on: 'sg80AAwjIwwjDAwjIwwjDAwiIwwjDAwjDCMjDA0jDCIkDA0jDCMMIwwjIwwMAAFgDCMMIwwjDCMAAAAA'
command_off: 'sgY0AA0jDSIiDQwiIg0NIw0jIw0NIg0jIg0jDSMNIw0NIw0jDSIMIyINDCMNIw0jIwwMAAFIIw0AAAAA'
friendly_name: 'Спальня'
a16_key:
command_on: 'JgBGAJOUEjgTOBI4EhMSExITEhMSExI5EjgSOBITEhMSExIUEhMSExI4EjgSExITEjkSOBI4EzcSExIUETkSOBITEhMSExIADQUAAAAA'
command_off: 'JgBGAJOUEjgTOBI4EhMSExITEhMSExI5EjgSOBITEhMSExIUEhMSExI4EjgSExITEjkSOBI4EzcSExIUETkSOBITEhMSExIADQUAAAAA'
friendly_name: 'Телевизор'
- platform: template
switches:
skylight:
value_template: "{{ is_state('group.my_aquara_switches', 'on') }}"
turn_on:
service: homeassistant.turn_on
entity_id: group.my_aquara_switches
turn_off:
service: homeassistant.turn_on
entity_id: group.my_aquara_switches
Here is groups.yaml
Lights:
name: Свет
control: hidden
entities:
- switch.a11_key
- switch.wall_switch_right_158d000245c5ca
- switch.wall_switch_left_158d000245c5ca
- group.my_aquara_switches
- switch.a14_key
- light.gateway_light_7811dcfd733d
my_aquara_switches:
name: Мастерская
entities:
- switch.wall_switch_left_158d00022363c5
- switch.wall_switch_right_158d00022363c5
Tinkerer
(aka DubhAd on GitHub)
August 18, 2018, 1:45pm
6
What doesn’t work? There’s no switch.skylight
? Or something else?
Argo
(Argo)
August 18, 2018, 2:16pm
7
Oh, sorry. I just had to write switch.skylight in groups.yaml instead of group.my_aquara_switches and correct final line of your example (there is “homeassistant.turn_on” two times instead on and off)
Now it works fine, thank you!
Here is corrected code
- platform: template
switches:
skylight:
value_template: "{{ is_state('group.my_aquara_switches', 'on') }}"
turn_on:
service: homeassistant.turn_on
entity_id: group.my_aquara_switches
turn_off:
service: homeassistant.turn_off
entity_id: group.my_aquara_switches
Argo
(Argo)
October 11, 2018, 9:24am
8
Hello. Here is one more question.
Is it possible to have one button to two switches (like it is right now) and to have 2 switches when I open it up? So, in main card I see one switch for group, but if I open that group I can choose whitch one I want tu turn on.
petro
(Petro)
October 11, 2018, 12:04pm
9
I don’t think that’s possible without a custom ui.
Tinkerer
(aka DubhAd on GitHub)
October 12, 2018, 6:37am
10
As @petro said - that’s only possible with a custom UI