spaddel
(spaddel)
March 6, 2024, 10:44pm
1
Hi all,
I would like to switch off my LG TV when I press a button in my Raspberrymatic. The button is a real switch on the wall. For that I created an automation: When the status of the button changes the TV will be switched off.
The problem when I use the switch on the dashboard it works perfectly
but when I use the wall switch it doesn´t.
Maybe I´m totally blind but I´m not able to convince the wall switch to do what I want.
Please let me know when you need more information.
Thanks for your support and regards
Christian
NathanCu
(Nathan Curtis)
March 6, 2024, 10:46pm
2
Please post whatever automation you’ve setup
spaddel
(spaddel)
March 6, 2024, 10:52pm
3
Hi Nathan,
I was to fast with the send button.
here is the code:
alias: TV Wohnzimmer aus
description: ""
trigger:
- platform: state
entity_id:
- button.raspberrymatic_p_schlafen_gehen
condition: []
action:
- service: media_player.turn_off
metadata: {}
data: {}
target:
entity_id: media_player.tv_wohnzimmer
mode: single
regards
Christian
1 Like
NathanCu
(Nathan Curtis)
March 6, 2024, 10:54pm
4
It happens… Do you have a trace from that automation?
spaddel
(spaddel)
March 6, 2024, 10:56pm
5
What do you mean with trace. I´m a home assistant beginner … I need a little bit more explnations.
ChD
spaddel
(spaddel)
March 7, 2024, 8:57am
7
Thanks. I will check it today evening.
regards
CHD
spaddel
(spaddel)
March 7, 2024, 11:28am
8
This is what I found in trace
this:
entity_id: automation.tv_wohnzimmer_aus
state: 'on'
attributes:
id: '1709505645516'
last_triggered: '2024-03-06T19:17:39.381645+00:00'
mode: single
current: 0
friendly_name: TV Wohnzimmer aus
last_changed: '2024-03-06T19:11:19.942481+00:00'
last_updated: '2024-03-06T19:17:39.388369+00:00'
context:
id: 01HRAK6BDN48HGN1JC64G45669
parent_id: 01HRAK6BD79WKKNDR7GEAVC6MX
user_id: null
trigger:
id: '0'
idx: '0'
alias: null
platform: state
entity_id: button.raspberrymatic_p_schlafen_gehen
from_state:
entity_id: button.raspberrymatic_p_schlafen_gehen
state: '2024-03-06T19:17:39.368554+00:00'
attributes:
name: Schlafen gehen
friendly_name: Raffstores schlafen
last_changed: '2024-03-06T19:17:39.368763+00:00'
last_updated: '2024-03-06T19:17:39.368763+00:00'
context:
id: 01HRAK6BD79WKKNDR7GEAVC6MX
parent_id: null
user_id: 0c4d6a4576e94e1086420c68e152ed5f
to_state:
entity_id: button.raspberrymatic_p_schlafen_gehen
state: '2024-03-06T19:17:39.368554+00:00'
attributes:
name: Schlafen gehen
friendly_name: Schlafen gehen
last_changed: '2024-03-06T19:17:39.368763+00:00'
last_updated: '2024-03-06T19:20:38.233828+00:00'
context:
id: 01HRAKBT2SHYQCTKYV7BK9TFFB
parent_id: null
user_id: null
for: null
attribute: null
regards
ChD
spaddel
(spaddel)
March 8, 2024, 10:55am
9