Indeed I request to send a RF-link “alloff” command using the service ,
I actually hoped there might be a way to change the state with the same service.
I’am not sure if you mean this :
The button that triggers my script already exist I use the script to shutdown my entire living room including all lights, television, thermostat and awning.
All i want is trying to shutdown all the lights at once instead one by one.
I tried to add the light as a device but this isn’t going to work because iam not able to add the “command”: “alloff”
I see your point. I had misunderstood you.
You are right that it is not possible to send the an allon/alloff command with a light or switch entity.
Let’s see the full picture. Correct me if I’m wrong.
You have several RF devices, one remote and the Home Assistant .
And (this is important) all your RF devices are paired with the remote.
Now, we have 2 scenarios:
if the remote alloff button is pressed, all devices power off AND Home Assistant detects the command. Because it is a group command (ALLOFF), HA sends the command to all the light devices. Even though the devices are already off, this command changes their status in HA.
when you send the command with the rflink.send_command service, HA just send the command (no states changes). And all your devices switch off because you are using the same device ID they are paired with. In this case HA don’t know which devices will switch off
Ok, this is fine, but what can I do (you might be wondering). I’m not sure
You could try to make a switch with the group.all_lights group (nor related with the remote device ID). I think that this may work. But in this case HA will trigger the switch_off service for all the devices and I think that you will see the devices power off one behind the other (and not all at the same time)
Also you could try to create an alias (with the remote device ID) for all your devices. Maybe this also triggers the state change for all of them.
I’m sorry, I think there’s no clean solution for your problem.
If i use “group.all_lights” to shutdown all my entities, as you mention it will result like before they wil turn off one by one instead turn off all at once.
I have the alias configured already that is only working for my remote
If I send the command using the service the service doesn’t change te state of my entity
when send the command “alloff” the difference between my logs from my remote and service call there is no passing event when using service call.
I assume the problems could be
Missing crucial data in the section “service data” (example “pass_event”:“light.test” )
Otherwise it could be a flaw in Hassio
For now I have buyed some zigbee lights to satisfy my needs
If I found a way about the alloff/allon command I will post it inhere.