Home Assistant : Q&A, Tips & Tricks, Your Configs

Vades

Well-Known Member
Joined
Apr 30, 2020
Messages
286
I seem to be struggling with what should be a really simple automation.

Any glaring issues with the following?

alias: TV turned on
description: Turns on Marantz AVR when TV is turned on
trigger:
- platform: state
entity_id: media_player.samsung_tv
from: 'off'
to: 'on'
condition: []
action:
- service: media_player.turn_on
target:
entity_id: media_player.home_theater
mode: single
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,040
I seem to be struggling with what should be a really simple automation.

Any glaring issues with the following?

alias: TV turned on
description: Turns on Marantz AVR when TV is turned on
trigger:
- platform: state
entity_id: media_player.samsung_tv
from: 'off'
to: 'on'
condition: []
action:
- service: media_player.turn_on
target:
entity_id: media_player.home_theater
mode: single
Does the marantz support WOL?
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
11,386
I seem to be struggling with what should be a really simple automation.

Any glaring issues with the following?

alias: TV turned on
description: Turns on Marantz AVR when TV is turned on
trigger:
- platform: state
entity_id: media_player.samsung_tv
from: 'off'
to: 'on'
condition: []
action:
- service: media_player.turn_on
target:
entity_id: media_player.home_theater
mode: single
If it is connected via hdmi, why not use cec on both to turn on off together?
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
11,386
A valid question, but every time I've given CEC a chance it gives me various issues.
Anyway. Test your automation by running the action manually while amp is off or in standby.

If that works, trigger is the issue.
If it doesn't work, then you need to fix action.
 

Vades

Well-Known Member
Joined
Apr 30, 2020
Messages
286
Anyway. Test your automation by running the action manually while amp is off or in standby.

If that works, trigger is the issue.
If it doesn't work, then you need to fix action.
Thanks, just tried that. Amp turns on immediately, so trigger is the issue.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
11,386
Thanks, just tried that. Amp turns on immediately, so trigger is the issue.
View the state of TV in dev tools, see what it shows there when on and off and if there are intermediate states between off and on
 

Vades

Well-Known Member
Joined
Apr 30, 2020
Messages
286
View the state of TV in dev tools, see what it shows there when on and off and if there are intermediate states between off and on
Thanks, took a look but now it's getting to the point where I am way in the deep end of what I understand...

State seems to be on when TV is on, and off when off.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,081
View the state of TV in dev tools, see what it shows there when on and off and if there are intermediate states between off and on
Thanks, took a look but now it's getting to the point where I am way in the deep end of what I understand...

State seems to be on when TV is on, and off when off.

The previous samsung integration I used had a "idle" state randomly between on and off. Maybe try remove the "from: off" part from the platform: state
 

Vades

Well-Known Member
Joined
Apr 30, 2020
Messages
286
The previous samsung integration I used had a "idle" state randomly between on and off. Maybe try remove the "from: off" part from the platform: state
Thanks, no change. Will relook at some other settings before I give up.
 

AmazeBalls

Active Member
Joined
Jul 13, 2013
Messages
65
Anyone able to get the Grafana graphs from the Solar Assisatnt dashboard into HA? I have copied the url from a graph in S.A, (share/embed) and pasted the link into a webpage card but doesnt show up. Any ideas?
 

Neuk_

Executive Member
Joined
Jan 23, 2018
Messages
6,691
Arg, for some reason when I want to even just look at my yaml setup which I access using Studio Code Server, my RPi becomes unavailable and I cannot access it via IP address, URL, etc. Has anyone else experienced this before?
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,040
Arg, for some reason when I want to even just look at my yaml setup which I access using Studio Code Server, my RPi becomes unavailable and I cannot access it via IP address, URL, etc. Has anyone else experienced this before?
Thankfully not, but then perhaps it's because I am also running HASS inside a Oracle VM on my PC.
 

Neuk_

Executive Member
Joined
Jan 23, 2018
Messages
6,691
Thankfully not, but then perhaps it's because I am also running HASS inside a Oracle VM on my PC.

I do plan on getting away from the RPi, I don't have a PC that sits at home though so will look at other options.
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,040
I do plan on getting away from the RPi, I don't have a PC that sits at home though so will look at other options.
Have to say it was the best move to run it as a VM on an old 2015 HP SFF PC (I bumped memory to 16GB) as it is faster and also don't need to worry about SD card wear.

That HP is now also my Plex Server and cloud clone server (OneDrive, GDrive, iCloud) - so it keeps a copy of everything (with it's own 2 week snapshot - just in case)

I snapshot my VM every few days (automated process) which get's uploaded to OneDrive and then downloaded on my other laptop (an even older 2010 spec i7 laptop)- in case I need to run from there if the main PC dies . The VM backup has saved me three times, already to recover from . I've had HASS updates bork the installation - and it's just been so easy to restore the VM again to 'roll-back' instead of trying to troubleshoot.

All these things run 24x7 unless like today, Eskom shares it's love with us.
 

Neuk_

Executive Member
Joined
Jan 23, 2018
Messages
6,691
Have to say it was the best move to run it as a VM on an old 2015 HP SFF PC (I bumped memory to 16GB) as it is faster and also don't need to worry about SD card wear.

That HP is now also my Plex Server and cloud clone server (OneDrive, GDrive, iCloud) - so it keeps a copy of everything (with it's own 2 week snapshot - just in case)

I snapshot my VM every few days (automated process) which get's uploaded to OneDrive and then downloaded on my other laptop (an even older 2010 spec i7 laptop)- in case I need to run from there if the main PC dies . The VM backup has saved me three times, already to recover from . I've had HASS updates bork the installation - and it's just been so easy to restore the VM again to 'roll-back' instead of trying to troubleshoot.

All these things run 24x7 unless like today, Eskom shares it's love with us.

I use Backups in HA which stores four days worth of backups on the RPi memory card and in my Google Drive and it has saved me already with updates gone wrong. I'll be looking at better but still small solution to the RPi, I don't really have the need for a full on server or probably even a VM.
 
Top