mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-07 02:18:43 +00:00
Refactor packages - define automations per device where possible
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
script:
|
||||
bulsatcom_power:
|
||||
alias: Bulsatcom · Power
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020250AF" }'
|
||||
|
||||
bulsatcom_up:
|
||||
alias: Bulsatcom · Up
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202D02F" }'
|
||||
|
||||
bulsatcom_down:
|
||||
alias: Bulsatcom · Down
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202708F" }'
|
||||
|
||||
bulsatcom_left:
|
||||
alias: Bulsatcom · Left
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020208F7" }'
|
||||
|
||||
bulsatcom_right:
|
||||
alias: Bulsatcom · Right
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x02028877" }'
|
||||
|
||||
bulsatcom_ok:
|
||||
alias: Bulsatcom · OK
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202B04F" }'
|
||||
|
||||
bulsatcom_1:
|
||||
alias: Bulsatcom · 1
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202807F" }'
|
||||
|
||||
bulsatcom_2:
|
||||
alias: Bulsatcom · 2
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020240BF" }'
|
||||
|
||||
bulsatcom_3:
|
||||
alias: Bulsatcom · 3
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202C03F" }'
|
||||
|
||||
bulsatcom_4:
|
||||
alias: Bulsatcom · 4
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020220DF" }'
|
||||
|
||||
bulsatcom_5:
|
||||
alias: Bulsatcom · 5
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202A05F" }'
|
||||
|
||||
bulsatcom_6:
|
||||
alias: Bulsatcom · 6
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202609F" }'
|
||||
|
||||
bulsatcom_7:
|
||||
alias: Bulsatcom · 7
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202E01F" }'
|
||||
|
||||
bulsatcom_8:
|
||||
alias: Bulsatcom · 8
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020210EF" }'
|
||||
|
||||
bulsatcom_9:
|
||||
alias: Bulsatcom · 9
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202906F" }'
|
||||
|
||||
bulsatcom_0:
|
||||
alias: Bulsatcom · 0
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020200FF" }'
|
||||
|
||||
bulsatcom_back:
|
||||
alias: Bulsatcom · Back
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202827D" }'
|
||||
|
||||
bulsatcom_info:
|
||||
alias: Bulsatcom · Info
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020242BD" }'
|
||||
|
||||
bulsatcom_menu:
|
||||
alias: Bulsatcom · Menu
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020202FD" }'
|
||||
|
||||
bulsatcom_volume_down:
|
||||
alias: Bulsatcom · Volume down
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020238C7" }'
|
||||
|
||||
bulsatcom_volume_up:
|
||||
alias: Bulsatcom · Volume up
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202A857" }'
|
||||
|
||||
bulsatcom_mute:
|
||||
alias: Bulsatcom · Mute
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020230CF" }'
|
||||
|
||||
bulsatcom_clock:
|
||||
alias: Bulsatcom · Clock
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020248B7" }'
|
||||
|
||||
bulsatcom_epg:
|
||||
alias: Bulsatcom · EPG
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202E21D" }'
|
||||
@@ -0,0 +1,50 @@
|
||||
automation:
|
||||
- alias: Lighting · Living Room · Toggle ceiling lights on desk switch single click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: single
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_ceiling
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Living Room · Toggle ambient lights on desk switch double click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: double
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_ambient
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Music · Living Room · Play pause on desk switch hold
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: hold
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
script:
|
||||
hdmi_switch_1:
|
||||
alias: HDMI Swtich · Set to 1
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE48B7" }'
|
||||
|
||||
hdmi_switch_2:
|
||||
alias: HDMI Swtich · Set to 2
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE58A7" }'
|
||||
|
||||
hdmi_switch_3:
|
||||
alias: HDMI Swtich · Set to 3
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE7887" }'
|
||||
|
||||
hdmi_switch_4:
|
||||
alias: HDMI Swtich · Set to 4
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE807F" }'
|
||||
|
||||
hdmi_switch_next:
|
||||
alias: HDMI Swtich · Next
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEC03F" }'
|
||||
|
||||
hdmi_switch_pip:
|
||||
alias: HDMI Swtich · PIP
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE50AF" }'
|
||||
|
||||
hdmi_switch_sel:
|
||||
alias: HDMI Swtich · SEL
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FED827" }'
|
||||
|
||||
hdmi_switch_enter:
|
||||
alias: HDMI Swtich · Enter
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEF807" }'
|
||||
@@ -0,0 +1,175 @@
|
||||
input_boolean:
|
||||
magic_cube_enabled:
|
||||
name: Enable Cube
|
||||
icon: mdi:cube-outline
|
||||
|
||||
input_select:
|
||||
magic_cube_mode:
|
||||
name: Cube Mode
|
||||
icon: mdi:cube-scan
|
||||
options:
|
||||
- music
|
||||
- light
|
||||
|
||||
automation:
|
||||
- alias: Magic Cube · Mode · Change
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: slide
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.magic_cube_mode
|
||||
data_template:
|
||||
option: >-
|
||||
|
||||
{% if trigger.event.data["args"]["activated_face"] == 5 %}
|
||||
music
|
||||
{% elif trigger.event.data["args"]["activated_face"] == 2 %}
|
||||
light
|
||||
{% else %}
|
||||
{{ states('input_select.magic_cube_mode') }}
|
||||
{% endif %}
|
||||
|
||||
# Lighting
|
||||
- alias: Magic Cube · Lighting · Toggle on Knock
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: knock
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "light"
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Magic Cube · Lighting · Dim on rotate left
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: rotate_left
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "light"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
data:
|
||||
brightness_step_pct: -20
|
||||
|
||||
- alias: Magic Cube · Lighting · Brighten on rotate right
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: rotate_right
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "light"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
data:
|
||||
brightness_step_pct: 20
|
||||
|
||||
# Music
|
||||
- alias: Magic Cube · Music · Play/Pause on Knock
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: knock
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "music"
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Magic Cube · Music · Volume down on rotate left
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: rotate_left
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "music"
|
||||
action:
|
||||
- service: media_player.volume_down
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Magic Cube · Music · Volume up on rotate right
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret magic_cube_ieee
|
||||
command: rotate_right
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.magic_cube_enabled
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_select.magic_cube_mode
|
||||
state: "music"
|
||||
action:
|
||||
- service: media_player.volume_up
|
||||
entity_id: media_player.living_room
|
||||
|
||||
#
|
||||
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||
#
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
sensor.cube_multistate_input:
|
||||
friendly_name: Cube input
|
||||
|
||||
sensor.cube_analog_input:
|
||||
friendly_name: Cube rotation
|
||||
|
||||
sensor.cube_power:
|
||||
friendly_name: Cube battery
|
||||
@@ -0,0 +1,253 @@
|
||||
binary_sensor:
|
||||
- platform: ping
|
||||
host: !secret titanium_ip
|
||||
name: titanium_ping
|
||||
scan_interval: 10
|
||||
count: 2
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
titanium:
|
||||
friendly_name: Titanium
|
||||
value_template: >-
|
||||
{{ is_state("binary_sensor.titanium_ping", "on") }}
|
||||
icon_template: >-
|
||||
{% if is_state("binary_sensor.titanium_ping", "on") %}
|
||||
mdi:desktop-mac-dashboard
|
||||
{% else %}
|
||||
mdi:desktop-mac
|
||||
{% endif %}
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium playing"
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
payload_on: "True"
|
||||
payload_off: "False"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/media/playing"
|
||||
|
||||
#
|
||||
# ─── IOTLink ──────────────────────────────────────────────────────────────
|
||||
#
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Titanium uptime"
|
||||
icon: mdi:clock-check
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/system/uptime"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium idle time"
|
||||
icon: mdi:clock-alert
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/system/idle-time"
|
||||
value_template: "{{ value | multiply(1/60) | round(0) }}"
|
||||
unit_of_measurement: "minutes"
|
||||
|
||||
# CPU
|
||||
- platform: mqtt
|
||||
name: "Titanium CPU usage"
|
||||
icon: mdi:chip
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/cpu/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
# Memory
|
||||
- platform: mqtt
|
||||
name: "Titanium memory used"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/memory/used"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium memory used percent"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/memory/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium memory available"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/memory/available"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium memory total"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/memory/total"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
# C Drive
|
||||
- platform: mqtt
|
||||
name: "Titanium C usage"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/hard-drive/c/drive-usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium C free space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/hard-drive/c/total-free-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium C used space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/hard-drive/c/used-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Titanium C total space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/hard-drive/c/total-size"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
|
||||
# Media
|
||||
- platform: mqtt
|
||||
name: "Titanium volume"
|
||||
icon: mdi:volume-medium
|
||||
availability_topic: "iotlink/workgroup/titanium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/titanium/windows-monitor/stats/media/volume"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
camera:
|
||||
- platform: mqtt
|
||||
name: "Titanium Screen 0"
|
||||
topic: "iotlink/workgroup/titanium/windows-monitor/stats/display/0/screen"
|
||||
- platform: mqtt
|
||||
name: "Titanium Screen 1"
|
||||
topic: "iotlink/workgroup/titanium/windows-monitor/stats/display/1/screen"
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
titanium:
|
||||
friendly_name: Titanium
|
||||
value_template: "{{ is_state('binary_sensor.titanium', 'on') }}"
|
||||
turn_on:
|
||||
service: script.titanium_start
|
||||
turn_off:
|
||||
service: script.titanium_shutdown
|
||||
icon_template: >-
|
||||
|
||||
{% if is_state('binary_sensor.titanium', 'on') %}
|
||||
mdi:monitor-dashboard
|
||||
{% else %}
|
||||
mdi:monitor-off
|
||||
{% endif %}
|
||||
|
||||
script:
|
||||
titanium_start:
|
||||
alias: Titanium · Start
|
||||
icon: mdi:play-box-outline
|
||||
sequence:
|
||||
- service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: !secret titanium_mac
|
||||
|
||||
titanium_shutdown:
|
||||
alias: Titanium · Shutdown
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/commands/shutdown"
|
||||
payload: ""
|
||||
|
||||
titanium_lock:
|
||||
alias: Titanium · Lock
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/commands/lock"
|
||||
payload: ""
|
||||
|
||||
titanium_vol_mute:
|
||||
alias: Titanium · Toggle Mute
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/commands/volume/mute"
|
||||
payload: ""
|
||||
|
||||
titanium_set_volume:
|
||||
alias: Titanium · Set volume
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
topic: "iotlink/workgroup/titanium/commands/volume/set"
|
||||
payload: "{{ volume | default(30) }}"
|
||||
|
||||
titanium_displays_on:
|
||||
alias: Titanium · Displays ON
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/commands/displays/on"
|
||||
payload: ""
|
||||
|
||||
titanium_displays_off:
|
||||
alias: Titanium · Displays OFF
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/commands/displays/off"
|
||||
payload: ""
|
||||
|
||||
titanium_refresh:
|
||||
alias: Titanium · Refresh
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/titanium/refresh"
|
||||
payload: ""
|
||||
|
||||
automation:
|
||||
- alias: Titanium · Turn off when idle
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.titanium_idle_time
|
||||
above: 180
|
||||
action:
|
||||
- service: script.titanium_shutdown
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "🖥 *Devices · Titanium*"
|
||||
message: "Hey, I'm turning Titanium off. It's been idling for 3 hours."
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "🖥 Devices · "
|
||||
message: "Titanium · Turning off - idling for 3 hours"
|
||||
@@ -0,0 +1,27 @@
|
||||
# https://github.com/hristo-atanasov/Tasmota-IRHVAC/
|
||||
climate:
|
||||
- platform: tasmota_irhvac
|
||||
name: "TOSHIBA AC"
|
||||
command_topic: "cmnd/ir_blaster_1/irhvac"
|
||||
state_topic: "tele/ir_blaster_1/RESULT"
|
||||
temperature_sensor: sensor.multisensor_6_temperature
|
||||
protocol: "TOSHIBA_AC"
|
||||
max_temp: 30 #optional - default 32 int value
|
||||
min_temp: 17
|
||||
target_temp: 22 #optional - default 26 int value
|
||||
away_temp: 18 #optional - default 24 int value
|
||||
supported_modes:
|
||||
- "heat"
|
||||
- "cool"
|
||||
- "dry"
|
||||
- "auto"
|
||||
- "off"
|
||||
supported_fan_speeds:
|
||||
- "min"
|
||||
- "low"
|
||||
- "medium"
|
||||
- "high"
|
||||
- "max"
|
||||
- "auto"
|
||||
supported_swing_list:
|
||||
- "off"
|
||||
@@ -0,0 +1,177 @@
|
||||
# https://www.home-assistant.io/integrations/webostv
|
||||
webostv:
|
||||
- host: !secret living_room_tv_ip
|
||||
name: Living Room TV
|
||||
turn_on_action:
|
||||
service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: !secret living_room_tv_mac
|
||||
|
||||
media_player:
|
||||
- platform: androidtv
|
||||
name: nvidia shield
|
||||
host: !secret nvidia_shield_host
|
||||
|
||||
script:
|
||||
tv_twitch:
|
||||
icon: mdi:twitch
|
||||
alias: TV · Start Twitch stream
|
||||
sequence:
|
||||
- service: script.tv_prepare_for_playback
|
||||
- service: androidtv.adb_command
|
||||
entity_id: media_player.nvidia_shield
|
||||
data_template:
|
||||
command: "am start -a android.intent.action.VIEW -d twitch://stream/{{ channel }}"
|
||||
|
||||
tv_fireplace:
|
||||
icon: mdi:fireplace
|
||||
alias: TV · Fireplace
|
||||
sequence:
|
||||
- service: script.tv_prepare_for_playback
|
||||
data:
|
||||
volume_level: 0.08
|
||||
- service: media_extractor.play_media
|
||||
entity_id: media_player.shield
|
||||
data:
|
||||
media_content_id: "https://www.youtube.com/watch?v=AWKzr6n0ea0"
|
||||
media_content_type: video/youtube
|
||||
|
||||
tv_bulsatcom_toggle:
|
||||
icon: mdi:remote-tv
|
||||
alias: TV · Bulsatcom toggle
|
||||
sequence:
|
||||
- service: script.bulsatcom_power
|
||||
- condition: state
|
||||
entity_id: media_player.living_room_tv
|
||||
state: "off"
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.living_room_tv
|
||||
- service: script.hdmi_switch_1
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room_tv
|
||||
data:
|
||||
source: Switch
|
||||
|
||||
latest_pds:
|
||||
alias: Play the latest PDS
|
||||
sequence:
|
||||
- service: media_extractor.play_media
|
||||
entity_id: media_player.shield
|
||||
data_template:
|
||||
media_content_id: "{{ state_attr('sensor.philip_defranco', 'url') }}"
|
||||
media_content_type: video/youtube
|
||||
|
||||
tv_prepare_for_playback:
|
||||
alias: TV · Prepare for playback
|
||||
sequence:
|
||||
- service: sonos.unjoin
|
||||
entity_id: media_player.living_room
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room
|
||||
data:
|
||||
source: TV
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.living_room
|
||||
data_template:
|
||||
volume_level: "{{ volume_level | default(0.3) }}"
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.nvidia_shield
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room_tv
|
||||
data:
|
||||
source: Shield
|
||||
|
||||
automation:
|
||||
- alias: TV · Join Beam to Sonos group when off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.living_room_tv
|
||||
to: "off"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: "day"
|
||||
action:
|
||||
- service: sonos.join
|
||||
data:
|
||||
master: media_player.master_bedroom
|
||||
entity_id: media_player.living_room
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sonos Group · TV off - joining Beam to Sonos Group"
|
||||
domain: media_player
|
||||
|
||||
- alias: TV · State · Sync on TV on
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.living_room_tv
|
||||
to: "on"
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.nvidia_shield
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning Shield on - TV is on"
|
||||
domain: media_player
|
||||
|
||||
|
||||
- alias: TV · State · Sync on TV off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.living_room_tv
|
||||
to: "off"
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.nvidia_shield
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning Shield off - TV is off"
|
||||
domain: media_player
|
||||
|
||||
- alias: TV · State · Sync on Shield on
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
from: "off"
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.living_room_tv
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room_tv
|
||||
data:
|
||||
source: "Shield"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning TV on - Shield is on"
|
||||
domain: media_player
|
||||
|
||||
|
||||
- alias: TV · State · Sync on Shield off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
to: "off"
|
||||
condition:
|
||||
condition: template
|
||||
value_template: "{{ is_state_attr('media_player.living_room_tv', 'source', 'Shield') }}"
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.living_room_tv
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning TV off - Shield is off"
|
||||
domain: media_player
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
media_player.living_room_tv:
|
||||
icon: mdi:television
|
||||
friendly_name: LG TV
|
||||
media_player.nvidia_shield:
|
||||
icon: mdi:set-top-box
|
||||
friendly_name: Nvidia Shield
|
||||
@@ -0,0 +1,106 @@
|
||||
# "event_type": "zwave.scene_activated",
|
||||
# "data": {
|
||||
# "entity_id": "zwave.aeon_labs_zw130_wallmote_quad",
|
||||
# "node_id": 5,
|
||||
# "scene_id": 2,
|
||||
# "scene_data": 1
|
||||
# },
|
||||
|
||||
automation:
|
||||
- alias: Wallmote · Living room · 1 · Tap · Toggle lights
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 1
|
||||
scene_data: 0
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 1 · Hold · Dim lights
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 1
|
||||
scene_data: 1
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
data_template:
|
||||
brightness: >
|
||||
|
||||
{% if state_attr('light.living_room_main', 'brightness') < 255 %}
|
||||
255
|
||||
{% else %}
|
||||
120
|
||||
{% endif %}
|
||||
|
||||
- alias: Wallmote · Living room · 2 · Tap · Toggle Music
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 2
|
||||
scene_data: 0
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 2 · Hold · Play music
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 2
|
||||
scene_data: 1
|
||||
action:
|
||||
- service: script.music_play
|
||||
|
||||
- alias: Wallmote · Living room · 3 · Tap · Volume down
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 3
|
||||
scene_data: 0
|
||||
action:
|
||||
- service: media_player.volume_down
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 3 · Hold · Volume up
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 3
|
||||
scene_data: 1
|
||||
action:
|
||||
- service: media_player.volume_up
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 4 · Hold · Toggle Titanium
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave.scene_activated
|
||||
event_data:
|
||||
entity_id: zwave.aeon_labs_zw130_wallmote_quad
|
||||
node_id: 5
|
||||
scene_id: 4
|
||||
scene_data: 1
|
||||
action:
|
||||
- service: switch.toggle
|
||||
entity_id: switch.titanium
|
||||
Reference in New Issue
Block a user