Automation or Scene?

Hello everyone. I’m wanting to build something that turns multiple devices on or off and that is activated from a voice command. The problem I have is that I don’t know whether to build a scene or an automation. I have the home theater and television that are turned on with a broadlink IR and I don’t know if it turned on after a few seconds. If this doesn’t happen, I would have to send the order again, but if I send it twice, it may turn it off again. What do you advise me to do? Could I use MQTT to solve these problems? Thank you very much

I don’t think it matters. I don’t like scenes because in order to modify them, you need to either edit the yaml or apply the settings while even viewing the scene. Personally, i’d want to use an automation to verify the tv went on if that was an issue with you with the IR.

How can you tell if the TV went on? Is it wifi connected? What device? etc.

There isn’t enough information here to really help you.

Ok. The problem is that maybe the IR sends an order but maybe it doesn’t receive it and it stays off.

The television is connected to the WiFi but I can only tell if it is on or off. That’s all. The home theater the same.But it takes a few seconds to inform me the status

That’s the general problem with IR and “not so smart” devices. :slight_smile: If you don’t get back a state from your TV, you can’t say, if you should send the command again or not. Without that information it is not possible to exactly decide.

Back to your other question regarding scenes or automations:
As @calisro said, scenes are not my favourite either, I find them complicate to use, and the point, that a scene in the UI can only be tested by running it. I read from a lot of people, who wake up their children in the middle of the night, because the changed a scene. :rofl:

But maybe you could try to see it from a different perspective. A scene is used, when you want to save an actual state and come back to it. To use an example beside from TVs, think of the following constellation:

You have two fans in your livingroom, that should start with full speed, when you open the balcony door. If you just want to turn them on or off, you can easily use an automation. If you want to know at what speed (and other options) the fans where before you opened the door, and want to revert back to exactly that state after you closed the door, you use a scene.

Scenes are mostly used, when you want something changed and afterwards exactly restored back. Like with some settings if you watch a movie and want the lights changed and afterwards get back to the state they were before and not to a “general” or “default” state.

Sorry, you wrote another answer, while I was writing. :slight_smile:

In this case an automation is ideal. You send the command, wait for an answer (state change), and if it is the state you wanted, you leave it as is, otherwise you run the command again.

Yes, sorry. I’m going to do it like this.

Been there done that! Multiple times!! I then removed them and use automations.

1 Like

I understand. I’m going to do it with an automation thank you very much. The only thing is to try to turn on until the device reports that it is already on.

1 Like

You know the wait templates? :slight_smile:

Are you sure you can’t get more info on these devices using some other integration? What kind of theatre and TV devices do you have?

No. Never use it. But I will read the documentation

Simply use a condition.

If the state == on just end the automation. If state == off send a command, set the wait_template and wait for a trigger state to on, then leave the automation. If the state doesn’t switch to on in let’s say for 30 seconds, than send the command again. :slight_smile:

EDIT: if you post what you have now, I’ll try to help change it. :wink:

I have a home BDV N9200w and a Samsung UN55HU7200 TV with which I only get one entity.

[quote=“paddy0174, post:13, topic:431065”]
If the state == on just end the automation. If state == off send a command, set the wait_template and wait for a trigger state to on, then leave the automation. If the state doesn’t switch to on in let’s say for 30 seconds, than send the command again. :slight_smile:

EDIT: if you post what you have now, I’ll try to help change it.
[/quote] Forgiveness. I haven’t done yet. Nothing, but I’m going to start doing it and then I can post it so you can help me if I have any questions

I’ll set the thread on my watchlist, so I get notified. :slight_smile:

I believe both of those devices are CEC-HDMI capable. That means you can control one and it should turn on/off the other. If you’re doing this from voice, why not turn the TV on from the automation rather than going through the IR?

The IR then would only be used by the human to interact after its all on? These things are always more simple on paper but you really want to take the IR our of the picture if you can. That TV is wifi capable and i’d be surprised if you can’t control it via HA directly.

EDIT: What are you using for voice control?

Now I’m officially confused. :rofl: That model should be supported by the official SamsungTV integration, meaning you should be able to control that TV over Wifi or ethernet. And I’m quite sure, if that wouldn’t work (what I doubt), there would be some other way to talk to that TV. At least over SammyRemote that should work.

And what @calisro says is right as well. With HDMI-CEC you should be able to control all peripherals of the TV via the TV (and down the road over Wifi with HA). :wink:

With media_player I can only turn off the tv but not turn it on.

For example, thanks to the fact that the integration recognized the DLNA Digital Media Renderer home theater, I can tell if it is turned on.

This I did not know. I will read to know how I can do it
Now I don’t have a raspberry, I changed it for an intel nuc