#Hello guys i am really new to HA I did

1 messages · Page 1 of 1 (latest)

iron marsh
#

thank you for you'r reply @swift iris. But sadly i can't do much with that, what you write. 😅 I mean, i have "Fritzbox" and "Denon" Integration added. So the Fritzbox detects what is actualy active in my Network (PC On or Off). In Denon Integration i can turn the AVR on and of + take Control of the Volume.

But what do i have to do now? How does it work in Home Automation? Do i need to so a automation? Do i need to use a Script? So this is a bit too much for me atm. 🫣😅. I was trying in Automation, but didn't had sucess.

swift iris
#

Now you write an automation

#

That's how you get HA to do anything automatically

#

The docs you need are linked from the topic of #automations-archived - but it'll be a state trigger on the device_tracker entity for the PC

#

Almost certainly going to: 'home'

iron marsh
#

So, can i use the Visual editor for that? or do i need to write a YAML?

swift iris
#

Yes, you can

iron marsh
#

perfect, then i will try it again, and looking for those docs! Thank you!

iron marsh
#

okey i did try to be successful. But without any luck.

I got the Trigger correctly. but i have problems with the action. I can`t turn on the avr. In the Picture you see i figured out the AVR. But i dont see how i use it for an Action
When i wannt to use aDevice
I have no options for Actions.

I did use the visual editor.
AVR: https://pasteboard.co/0UkWUMTKGg83.png

halcyon crestBOT
#

Sadly we're not mind readers (any more anyway, not after the last time we tried). Please share the YAML and any errors so we can see what you've done.

swift iris
#

You'll find the YAML in automations.yaml

iron marsh
#

oh lol, why does that happen ^^ i was just going to my avr and turned it on in Home Assistant then i noticed on the Logbook that the Service did turn on the AVR. 💡 And i was always trying to do it directly.

I think now i just need a dellay for set the volume (give the avr some time to start).

this is the YAML atm:

description: Automatische einschaltung von AVR und Lautstärke eingestellt.
trigger:
  - platform: state
    entity_id:
      - device_tracker.dannypc
    from: not_home
    to: home
condition: []
action:
  - if:
      - condition: state
        entity_id: media_player.pc_media_2
        state: "off"
    then:
      - service: media_player.turn_on
        data: {}
        target:
          device_id: 0f275da6f9500108f781eaf2c8e0300c
      - service: media_player.volume_set
        data:
          volume_level: 0.85
        target:
          device_id: 91874e7500d60fd002b80ea4c7391e19
    else:
      - condition: state
        entity_id: device_tracker.dannypc
        state: not_home
      - service: media_player.turn_off
        data: {}
        target:
          device_id: 0f275da6f9500108f781eaf2c8e0300c
mode: single