Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # home assistant media player config
- # by : badbummer#6975
- input_boolean:
- computer_power:
- name: 'pc status'
- switch:
- - platform: template
- switches:
- pc :
- value_template: "{{ is_state('input_boolean.computer_power', 'on') }}"
- turn_on:
- - service: switch.turn_on
- entity_id: switch.MY SMART PLUG
- - service: input_boolean.turn_on
- entity_id: input_boolean.computer_power
- turn_off:
- - service: mqtt.publish
- data_template:
- topic: homeassistant/switch/PC NAME/Shutdown/set
- payload: 'ON'
- - service: input_boolean.turn_off
- entity_id: input_boolean.computer_power
- media_player:
- - platform: universal
- name: pc_media_player
- children:
- - media_player.kodi_b327aa7af788b026800fd8eb8586b3c5
- - switch.pc
- commands:
- turn_on:
- service: switch.turn_on
- target:
- entity_id: switch.pc
- turn_off:
- service: switch.turn_off
- target:
- entity_id: switch.pc
- volume_up:
- service: switch.turn_on
- target:
- entity_id: switch.volumeup
- volume_down:
- service: switch.turn_on
- target:
- entity_id: switch.volumedown
- volume_mute:
- service: switch.turn_on
- target:
- entity_id: switch.mute
- media_play:
- service: switch.turn_on
- target:
- entity_id: switch.playpause
- media_pause:
- service: switch.turn_on
- target:
- entity_id: switch.playpause
- media_previous_track:
- service: switch.turn_on
- target:
- entity_id: switch.previous
- media_next_track:
- service: switch.turn_on
- target:
- entity_id: switch.next
- attributes:
- # is_volume_muted:
- state: input_boolean.computer_power
- volume_level: sensor.currentvolume
- device_class: tv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement