mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-25 04:48:17 +00:00
(Re-)implement Titanium as Cadmium
This commit is contained in:
@@ -126,7 +126,7 @@ recorder: &recorder_config
|
||||
- switch.camera
|
||||
- switch.desk_outlet
|
||||
- switch.pihole_temp_disable
|
||||
- switch.titanium
|
||||
- switch.cadmium
|
||||
|
||||
# https://www.home-assistant.io/integrations/history
|
||||
history: *recorder_config
|
||||
|
||||
@@ -32,8 +32,7 @@ cards:
|
||||
service: automation.reload
|
||||
- entity: sensor.automations_count
|
||||
icon: mdi:pound
|
||||
- automation.titanium_turn_off_when_idle
|
||||
- automation.titanium_notify_on_vibration_sensor_move
|
||||
- automation.cadmium_turn_off_when_idle
|
||||
- automation.slack_meeting_starts
|
||||
- automation.slack_meeting_ends
|
||||
- automation.hallway_tablet_set_to_home_after_10_minutes
|
||||
|
||||
@@ -23,9 +23,9 @@ cards:
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: custom:decluttering-card
|
||||
template: titanium_card
|
||||
template: cadmium_card
|
||||
variables:
|
||||
- title: Titanium
|
||||
- title: Cadmium
|
||||
- icon: mdi:desktop-tower
|
||||
|
||||
- type: custom:decluttering-card
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
titanium_card:
|
||||
cadmium_card:
|
||||
default:
|
||||
- title:
|
||||
- icon:
|
||||
@@ -9,7 +9,7 @@ titanium_card:
|
||||
title: "[[title]]"
|
||||
icon: "[[icon]]"
|
||||
entities:
|
||||
- switch.titanium
|
||||
- switch.cadmium
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: entities
|
||||
@@ -20,26 +20,24 @@ titanium_card:
|
||||
}
|
||||
|
||||
entities:
|
||||
- sensor.titanium_uptime
|
||||
- sensor.titanium_idle_time
|
||||
- binary_sensor.titanium_playing
|
||||
- sensor.titanium_volume
|
||||
- sensor.cadmium_uptime
|
||||
- sensor.cadmium_idle_time
|
||||
- type: custom:fold-entity-row
|
||||
head:
|
||||
type: custom:decluttering-card
|
||||
template: percentage_card
|
||||
variables:
|
||||
- name: Memory
|
||||
- entity: sensor.titanium_memory_used_percent
|
||||
- entity: sensor.cadmium_memory_used_percent
|
||||
- icon: mdi:memory
|
||||
- orange: 70
|
||||
- red: 85
|
||||
entities:
|
||||
- entity: sensor.titanium_memory_used
|
||||
- entity: sensor.cadmium_memory_used
|
||||
name: Memory used
|
||||
- entity: sensor.titanium_memory_available
|
||||
- entity: sensor.cadmium_memory_available
|
||||
name: Memory available
|
||||
- entity: sensor.titanium_memory_total
|
||||
- entity: sensor.cadmium_memory_total
|
||||
name: Memory total
|
||||
|
||||
- type: custom:fold-entity-row
|
||||
@@ -48,24 +46,24 @@ titanium_card:
|
||||
template: percentage_card
|
||||
variables:
|
||||
- name: "C: Drive"
|
||||
- entity: sensor.titanium_c_usage
|
||||
- entity: sensor.cadmium_c_usage
|
||||
- icon: mdi:harddisk
|
||||
- orange: 70
|
||||
- red: 85
|
||||
entities:
|
||||
- entity: sensor.titanium_c_used_space
|
||||
- entity: sensor.cadmium_c_used_space
|
||||
name: "C: Drive used"
|
||||
- entity: sensor.titanium_c_free_space
|
||||
- entity: sensor.cadmium_c_free_space
|
||||
name: "C: Drive available"
|
||||
- entity: sensor.titanium_c_total_space
|
||||
- entity: sensor.cadmium_c_total_space
|
||||
name: "C: Drive total"
|
||||
- type: custom:mini-graph-card
|
||||
align_state: left
|
||||
entities:
|
||||
- color: var(--accent-color)
|
||||
entity: sensor.titanium_cpu_usage
|
||||
entity: sensor.cadmium_cpu_usage
|
||||
- color: green
|
||||
entity: sensor.titanium_memory_used_percent
|
||||
entity: sensor.cadmium_memory_used_percent
|
||||
points_per_hour: 1
|
||||
line_width: 3
|
||||
hour24: true
|
||||
@@ -86,60 +84,29 @@ titanium_card:
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_lock
|
||||
entity: script.cadmium_lock
|
||||
name: Lock
|
||||
icon: mdi:lock
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_vol_mute
|
||||
name: Mute
|
||||
icon: mdi:volume-mute
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_set_volume
|
||||
name: Set volume
|
||||
icon: mdi:volume-medium
|
||||
tap_action:
|
||||
action: toggle
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_displays_on
|
||||
entity: script.cadmium_displays_on
|
||||
name: Displays on
|
||||
icon: mdi:monitor-dashboard
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_displays_off
|
||||
entity: script.cadmium_displays_off
|
||||
name: Displays off
|
||||
icon: mdi:monitor-off
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: script.titanium_refresh
|
||||
entity: script.cadmium_refresh
|
||||
name: Refresh
|
||||
icon: mdi:refresh
|
||||
tap_action:
|
||||
action: toggle
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: picture-entity
|
||||
aspect_ratio: 50%
|
||||
entity: camera.titanium_screen_1
|
||||
show_name: false
|
||||
show_state: false
|
||||
|
||||
- type: picture-entity
|
||||
aspect_ratio: 50%
|
||||
entity: camera.titanium_screen_0
|
||||
show_name: false
|
||||
show_state: false
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
# Living room ───────────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Titanium
|
||||
# Cadmium
|
||||
- type: custom:decluttering-card
|
||||
template: floorplan_state_icon
|
||||
variables:
|
||||
- entity: switch.titanium
|
||||
- entity: switch.cadmium
|
||||
- top: 62%
|
||||
- left: 81%
|
||||
|
||||
|
||||
@@ -121,6 +121,9 @@ card:
|
||||
template: [v3_button_tv, v3_tablet_button]
|
||||
entity: media_player.living_room_tv
|
||||
name: TV
|
||||
- type: custom:button-card
|
||||
template: v3_tablet_button
|
||||
entity: switch.cadmium
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
|
||||
@@ -137,9 +137,13 @@ card:
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: [v3_button_tv, v3_tablet_button]
|
||||
entity: media_player.living_room_tv
|
||||
name: TV
|
||||
template: [v3_button_cover, v3_tablet_button]
|
||||
entity: cover.living_room
|
||||
name: LR Blinds
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.toggle_living_room_cover
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
@@ -164,12 +168,12 @@ card:
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: [v3_button_cover, v3_tablet_button]
|
||||
entity: cover.living_room
|
||||
name: LR Blinds
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.toggle_living_room_cover
|
||||
template: [v3_button_tv, v3_tablet_button]
|
||||
entity: media_player.living_room_tv
|
||||
name: TV
|
||||
- type: custom:button-card
|
||||
template: v3_tablet_button
|
||||
entity: switch.cadmium
|
||||
- type: custom:button-card
|
||||
template: [v3_button_purifier, v3_tablet_button]
|
||||
entity: fan.philips_airpurifier
|
||||
|
||||
@@ -62,22 +62,24 @@
|
||||
template: v3_section_title
|
||||
variables:
|
||||
- title: Scenes
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: v3_scene
|
||||
entity: scene.living_room_ambient_neon
|
||||
name: Neon
|
||||
variables:
|
||||
scene_color_1: rgba(255, 0, 190, 1)
|
||||
scene_color_2: rgba(0, 255, 190, 1)
|
||||
- type: custom:button-card
|
||||
template: v3_scene
|
||||
entity: scene.living_room_ambient_default
|
||||
name: Warm
|
||||
variables:
|
||||
scene_color_1: rgba(240, 240, 190, 1)
|
||||
scene_color_2: rgba(255, 210, 170, 1)
|
||||
- type: custom:decluttering-card
|
||||
template: v3_horizontal_stack_card
|
||||
variables:
|
||||
- cards:
|
||||
- type: custom:button-card
|
||||
template: v3_scene
|
||||
entity: scene.living_room_ambient_neon
|
||||
name: Neon
|
||||
variables:
|
||||
scene_color_1: rgba(255, 0, 190, 1)
|
||||
scene_color_2: rgba(0, 255, 190, 1)
|
||||
- type: custom:button-card
|
||||
template: v3_scene
|
||||
entity: scene.living_room_ambient_default
|
||||
name: Warm
|
||||
variables:
|
||||
scene_color_1: rgba(240, 240, 190, 1)
|
||||
scene_color_2: rgba(255, 210, 170, 1)
|
||||
- type: custom:decluttering-card
|
||||
template: v3_section_title
|
||||
variables:
|
||||
@@ -127,6 +129,12 @@
|
||||
template: v3_button_tv
|
||||
entity: media_player.living_room_tv
|
||||
name: TV
|
||||
- type: custom:button-card
|
||||
template: v3_button
|
||||
entity: switch.cadmium
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: v3_button_cover
|
||||
entity: cover.living_room
|
||||
@@ -134,9 +142,6 @@
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.toggle_living_room_cover
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: v3_button_radiator
|
||||
entity: climate.living_room_radiator_mode
|
||||
@@ -149,6 +154,8 @@
|
||||
action: call-service
|
||||
service: script.toshiba_ac_toggle
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: v3_button_power
|
||||
entity: switch.desk_outlet
|
||||
|
||||
@@ -418,11 +418,11 @@ fan.philips_airpurifier:
|
||||
type: custom:decluttering-card
|
||||
template: philips_airpurifier_card
|
||||
|
||||
switch.titanium:
|
||||
title: Titanium
|
||||
switch.cadmium:
|
||||
title: Cadmium
|
||||
card:
|
||||
type: custom:decluttering-card
|
||||
template: titanium_card
|
||||
template: cadmium_card
|
||||
|
||||
sensor.fast_com_download:
|
||||
title: Network Speed
|
||||
|
||||
227
config/packages/devices/living_room/cadmium.yaml
Normal file
227
config/packages/devices/living_room/cadmium.yaml
Normal file
@@ -0,0 +1,227 @@
|
||||
binary_sensor:
|
||||
- platform: ping
|
||||
host: !secret cadmium_ip
|
||||
name: cadmium_ping
|
||||
scan_interval: 10
|
||||
count: 2
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
cadmium:
|
||||
friendly_name: Cadmium
|
||||
value_template: >-
|
||||
{{ is_state("binary_sensor.cadmium_ping", "on") }}
|
||||
icon_template: >-
|
||||
{{ is_state("binary_sensor.cadmium_ping", "on") | iif(' mdi:desktop-mac-dashboard', 'mdi:desktop-mac') }}
|
||||
|
||||
#
|
||||
# ─── IOTLink ──────────────────────────────────────────────────────────────
|
||||
#
|
||||
|
||||
mqtt:
|
||||
# binary_sensor:
|
||||
# - name: "Cadmium playing"
|
||||
# availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
# payload_available: "ON"
|
||||
# payload_not_available: "OFF"
|
||||
# payload_on: "True"
|
||||
# payload_off: "False"
|
||||
# state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/media/playing"
|
||||
|
||||
sensor:
|
||||
- name: "Cadmium uptime"
|
||||
icon: mdi:clock-check
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/system/uptime"
|
||||
|
||||
- name: "Cadmium idle time"
|
||||
icon: mdi:clock-alert
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/system/idle-time"
|
||||
value_template: "{{ value | multiply(1/60) | round(0) }}"
|
||||
unit_of_measurement: "minutes"
|
||||
|
||||
# CPU
|
||||
- name: "Cadmium CPU usage"
|
||||
icon: mdi:chip
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/cpu/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
|
||||
# Memory
|
||||
- name: "Cadmium memory used"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/used"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- name: "Cadmium memory used percent"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- name: "Cadmium memory available"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/available"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- name: "Cadmium memory total"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/total"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
# C Drive
|
||||
- name: "Cadmium C usage"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/drive-usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- name: "Cadmium C free space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/total-free-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- name: "Cadmium C used space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/used-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- name: "Cadmium C total space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/total-size"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
|
||||
# # Media
|
||||
# - name: "Cadmium volume"
|
||||
# icon: mdi:volume-medium
|
||||
# availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
# payload_available: "ON"
|
||||
# payload_not_available: "OFF"
|
||||
# state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/media/volume"
|
||||
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
cadmium:
|
||||
friendly_name: Cadmium
|
||||
value_template: "{{ is_state('binary_sensor.cadmium', 'on') }}"
|
||||
turn_on:
|
||||
service: script.cadmium_start
|
||||
turn_off:
|
||||
service: script.cadmium_shutdown
|
||||
icon_template: >-
|
||||
{{ is_state('binary_sensor.cadmium', 'on') | iif('mdi:monitor-dashboard', 'mdi:monitor-off') }}
|
||||
|
||||
script:
|
||||
cadmium_start:
|
||||
alias: Cadmium · Start
|
||||
icon: mdi:play-box-outline
|
||||
sequence:
|
||||
- service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: !secret cadmium_mac
|
||||
|
||||
cadmium_shutdown:
|
||||
alias: Cadmium · Shutdown
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/shutdown"
|
||||
payload: ""
|
||||
|
||||
cadmium_lock:
|
||||
alias: Cadmium · Lock
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/lock"
|
||||
payload: ""
|
||||
|
||||
# cadmium_vol_mute:
|
||||
# alias: Cadmium · Toggle Mute
|
||||
# sequence:
|
||||
# - service: mqtt.publish
|
||||
# data:
|
||||
# topic: "iotlink/workgroup/cadmium/commands/volume/mute"
|
||||
# payload: ""
|
||||
|
||||
# cadmium_set_volume:
|
||||
# alias: Cadmium · Set volume
|
||||
# sequence:
|
||||
# - service: mqtt.publish
|
||||
# data_template:
|
||||
# topic: "iotlink/workgroup/cadmium/commands/volume/set"
|
||||
# payload: "{{ volume | default(30) }}"
|
||||
|
||||
cadmium_displays_on:
|
||||
alias: Cadmium · Displays ON
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/displays/on"
|
||||
payload: ""
|
||||
|
||||
cadmium_displays_off:
|
||||
alias: Cadmium · Displays OFF
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/displays/off"
|
||||
payload: ""
|
||||
|
||||
cadmium_refresh:
|
||||
alias: Cadmium · Refresh
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/refresh"
|
||||
payload: ""
|
||||
|
||||
automation:
|
||||
- alias: Cadmium · Turn off when idle
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.cadmium_idle_time
|
||||
above: 180
|
||||
action:
|
||||
- service: script.cadmium_shutdown
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "🖥 *Devices · Cadmium*"
|
||||
message: "Hey, I'm turning Cadmium off. It's been idling for 3 hours."
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "🖥 Devices · "
|
||||
message: "Cadmium · Turning off - idling for 3 hours"
|
||||
@@ -1,265 +0,0 @@
|
||||
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: >-
|
||||
{{ is_state("binary_sensor.titanium_ping", "on") | iif(' mdi:desktop-mac-dashboard', 'mdi:desktop-mac') }}
|
||||
|
||||
# - 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: >-
|
||||
{{ is_state('binary_sensor.titanium', 'on') | iif('mdi:monitor-dashboard', 'mdi:monitor-off') }}
|
||||
|
||||
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"
|
||||
|
||||
- alias: Titanium · Notify on vibration sensor move
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/vibration_sensor"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.georgi_home
|
||||
state: 'off'
|
||||
action:
|
||||
- service: notify.mobile_app_carbon
|
||||
data:
|
||||
title: "Titanium"
|
||||
message: "Alert: Titanium sensor moved"
|
||||
data:
|
||||
push:
|
||||
thread-id: "titanium"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "🖥 Devices · "
|
||||
message: "Titanium · Sensor moved alert"
|
||||
@@ -37,7 +37,7 @@ alexa:
|
||||
- script.brita_pour_water
|
||||
- script.latest_pds
|
||||
- script.music_play
|
||||
- script.titanium_start
|
||||
- script.cadmium_start
|
||||
|
||||
entity_config:
|
||||
light.ceiling:
|
||||
@@ -88,5 +88,5 @@ alexa:
|
||||
name: "Play the latest PDS"
|
||||
script.music_play:
|
||||
name: "Music chill"
|
||||
script.titanium_start:
|
||||
name: "Titanium"
|
||||
script.cadmium_start:
|
||||
name: "Cadmium"
|
||||
|
||||
@@ -43,7 +43,7 @@ script:
|
||||
- light.light_lohas_6
|
||||
- media_player.nvidia_shield
|
||||
- media_player.living_room_tv
|
||||
- switch.titanium
|
||||
- switch.cadmium
|
||||
- group.all_radiators
|
||||
|
||||
- service: light.turn_on
|
||||
|
||||
Reference in New Issue
Block a user