346 lines
11 KiB
YAML
346 lines
11 KiB
YAML
binary_sensor:
|
|
- platform: mqtt
|
|
name: "My Computer - Connected"
|
|
state_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
value_template: "{{ value }}"
|
|
payload_on: "ON"
|
|
payload_off: "OFF"
|
|
device_class: "connectivity"
|
|
qos: 1
|
|
|
|
sensor:
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Current User"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/system/current-user"
|
|
unit_of_measurement: ''
|
|
icon: mdi:account
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Idle Time"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/system/idle-time"
|
|
unit_of_measurement: 'seconds'
|
|
icon: mdi:timer
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - CPU Usage"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/cpu/usage"
|
|
unit_of_measurement: '%'
|
|
icon: mdi:speedometer
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - RAM Usage"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/memory/usage"
|
|
unit_of_measurement: '%'
|
|
icon: mdi:memory
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - RAM Available"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/memory/available"
|
|
unit_of_measurement: 'MB'
|
|
icon: mdi:memory
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - RAM Used"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/memory/used"
|
|
unit_of_measurement: 'MB'
|
|
icon: mdi:memory
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - RAM Total"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/memory/total"
|
|
unit_of_measurement: 'MB'
|
|
icon: mdi:memory
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Usage (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/drive-usage"
|
|
unit_of_measurement: '%'
|
|
icon: mdi:chart-donut
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Total Size (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/total-size"
|
|
unit_of_measurement: 'GB'
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Total Free Space (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/total-free-space"
|
|
unit_of_measurement: 'GB'
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Free Space (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/available-free-space"
|
|
unit_of_measurement: 'GB'
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Used Space (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/used-space"
|
|
unit_of_measurement: 'GB'
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Format (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/drive-format"
|
|
unit_of_measurement: ''
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - HDD Label (C)"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/hard-drive/c/volume-label"
|
|
unit_of_measurement: ''
|
|
icon: mdi:harddisk
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Network IPv4"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/network/0/ipv4"
|
|
unit_of_measurement: ''
|
|
icon: mdi:lan
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Network IPv6"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/network/0/ipv6"
|
|
unit_of_measurement: ''
|
|
icon: mdi:lan
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Network Speed"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/network/0/speed"
|
|
unit_of_measurement: 'Mbps'
|
|
icon: mdi:speedometer
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
- platform: mqtt
|
|
name: "My Computer - Network Wired"
|
|
state_topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/network/0/wired"
|
|
unit_of_measurement: ''
|
|
icon: mdi:ethernet
|
|
value_template: "{{ value }}"
|
|
availability_topic: "iotlink/workgroup/tony-asus/lwt"
|
|
payload_available: "ON"
|
|
payload_not_available: "OFF"
|
|
qos: 1
|
|
|
|
camera:
|
|
- platform: mqtt
|
|
name: "Tony Desktop - Screen 0"
|
|
topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/display/0/screen"
|
|
- platform: mqtt
|
|
name: "Tony Desktop - Screen 1"
|
|
topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/display/1/screen"
|
|
- platform: mqtt
|
|
name: "Tony Desktop - Screen 2"
|
|
topic: "iotlink/workgroup/tony-asus/windows-monitor/stats/display/2/screen"
|
|
|
|
switch:
|
|
- platform: template
|
|
switches:
|
|
my_computer:
|
|
friendly_name: "My Computer"
|
|
value_template: "{{ is_state('binary_sensor.my_computer_connected', 'on') }}"
|
|
turn_on:
|
|
service: script.my_computer_wake
|
|
turn_off:
|
|
service: script.my_computer_shutdown
|
|
icon_template: mdi:laptop
|
|
|
|
script:
|
|
my_computer_wake:
|
|
# To enable see https://www.home-assistant.io/components/wake_on_lan/
|
|
alias: "My Computer - Wake"
|
|
sequence:
|
|
- service: wake_on_lan.send_magic_packet
|
|
data:
|
|
mac: "70:85:C2:63:9F:11"
|
|
|
|
my_computer_shutdown:
|
|
alias: "My Computer - Shutdown"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/shutdown"
|
|
payload: ""
|
|
|
|
my_computer_suspend:
|
|
alias: "My Computer - Suspend"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/suspend"
|
|
payload: ""
|
|
|
|
my_computer_hibernate:
|
|
alias: "My Computer - Hibernate"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/hibernate"
|
|
payload: ""
|
|
|
|
my_computer_reboot:
|
|
alias: "My Computer - Reboot"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/reboot"
|
|
payload: ""
|
|
|
|
my_computer_lock:
|
|
alias: "My Computer - Lock"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/lock"
|
|
payload: ""
|
|
|
|
my_computer_logoff:
|
|
alias: "My Computer - Logoff"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/logoff"
|
|
payload: ""
|
|
|
|
my_computer_vol_mute:
|
|
alias: "My Computer - Toggle Mute"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/volume/mute"
|
|
payload: ""
|
|
|
|
my_computer_vol_max:
|
|
alias: "My Computer - Vol Max"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/volume/set"
|
|
payload: "100"
|
|
|
|
my_computer_displays_on:
|
|
alias: "My Computer - Displays ON"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/displays/on"
|
|
payload: ""
|
|
|
|
my_computer_displays_off:
|
|
alias: "My Computer - Displays OFF"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/displays/off"
|
|
payload: ""
|
|
|
|
my_computer_refresh:
|
|
alias: "My Computer - Refresh"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/refresh"
|
|
payload: ""
|
|
|
|
my_computer_notify:
|
|
alias: "My Computer - Notify"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/notify"
|
|
payload: '{ "title": "My Notification Title", "message": "This is an example of notification using IOT Link", "launchParams": "toast://open/https://iotlink.gitlab.io" }'
|
|
|
|
my_computer_run_chrome:
|
|
alias: "My Computer - Run Chrome"
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "iotlink/workgroup/tony-asus/commands/run"
|
|
payload: '{ "command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "args": "https://iotlink.gitlab.io", "path": "C:\\Program Files (x86)\\Google\\Chrome\\Application", "user": "", "visible": true, "fallback": true }'
|