Files
homeassistant-bluetooth-dev…/home-assistant/packages/livingroom.yaml
2021-02-19 19:51:50 +01:00

126 lines
3.6 KiB
YAML
Executable File

media_player:
- platform: mopidy
name: MPD Livingroom
host: 10.10.40.6
port: 6682
emulated_roku:
servers:
- name: Roku
listen_port: 8060
host_ip: 10.10.40.6
input_boolean:
# Do not Disturb Boolean
dnd_livingroom:
name: DnD Wohnzimmer
icon: mdi:cancel
binary_sensor:
- platform: template
sensors:
# Room Occupancy
occupancy_livingroom:
friendly_name: Wohnzimmer besetzt
device_class: occupancy
value_template: >-
{% set motion = is_state('binary_sensor.motion_livingroom', 'on') %}
{% set tv = is_state('remote.wohnzimmer', 'on') %}
{{ motion or tv }}
delay_off:
minutes: 10
automation:
# Turn lights on (if not already on) when motion is detected
- id: motion_light_on_livingroom
alias: "Licht an bei Bewegung - Wohnzimmer"
mode: single
trigger:
platform: state
entity_id: binary_sensor.motion_livingroom
to: "on"
condition: "{{ is_state('light.livingroom', 'off') }}"
action:
service: light.turn_on
entity_id: light.livingroom
# Turn lights off when room is not occupied anymore
- id: no_occupancy_light_off_livingroom
alias: "Licht aus Wohnzimmer nicht besetzt"
mode: single
trigger:
platform: state
entity_id: binary_sensor.occupancy_livingroom
to: "off"
condition: "{{ is_state('light.livingroom', 'on') }}"
action:
service: light.turn_off
entity_id: light.livingroom
# Light Remote Livingroom
- id: 'remote_light_livingroom'
alias: "Licht Schalter Wohnzimmer"
use_blueprint:
path: custom/hue_dimmer_light.yaml
input:
transition_time_dim: '5'
remote: remote_light_livingroom
light: light.livingroom
# Entity Customization
homeassistant:
customize:
# Lights
light.livingroom:
friendly_name: Wohnzimmer
icon: mdi:lightbulb
light.livingroom_floor_front:
friendly_name: Vorne
icon: mdi:floor-lamp
light.livingroom_floor_back:
friendly_name: Hinten
icon: mdi:floor-lamp
# Media Players
media_player.mpd_livingroom:
friendly_name: MPD Wohnzimmer
media_player.snapclient_livingroom:
friendly_name: Snapclient Wohnzimmer
media_player.kodi_livingroom:
friendly_name: Medien Wohnzimmer
media_player.receiver_livingroom:
friendly_name: Verstärker Wohnzimmer
# Remotes
remote.wohnzimmer:
friendly_name: Fernbedienung Wohnzimmer
# Door/Window Sensor
binary_sensor.window_livingroom:
friendly_name: Fenster Wohnzimmer
device_class: window
binary_sensor.door_livingroom:
friendly_name: Tür Wohnzimmer
device_class: door
# Motion/Tamper Sensors
binary_sensor.motion_livingroom:
friendly_name: Wohnzimmer
device_class: motion
# Environment Sensors
sensor.temperature_livingroom:
friendly_name: Wohnzimmer
device_class: temperature
unit_of_measurement: "°C"
sensor.humidity_livingroom:
friendly_name: Wohnzimmer
device_class: humidity
unit_of_measurement: "%"
# Battery Sensors
sensor.battery_level_door_livingroom:
friendly_name: Tür Sensor Wohnzimmer
sensor.battery_level_window_livingroom:
friendly_name: Fenster Sensor Wohnzimmer
sensor.battery_level_motion_livingroom:
friendly_name: Bewegung Sensor Wohnzimmer
sensor.battery_level_temperature_livingroom:
friendly_name: Temperatur Sensor Wohnzimmer
sensor.battery_level_remote_light_livingroom:
friendly_name: Remote Licht Wohnzimmer