Sony TV replaces Viera, Veon Media Button Updates
This commit is contained in:
@@ -19,3 +19,11 @@ mqtt:
|
||||
state_topic: "tele/tasmo-wemosd1-7280-powermon-1/SENSOR"
|
||||
unit_of_measurement: "kW"
|
||||
value_template: "{{ value_json.ENERGY.Power[2] }}"
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
electricity_power_total:
|
||||
friendly_name: "Electricity Power Total"
|
||||
unit_of_measurement: "W"
|
||||
value_template: "{{ states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_0') |float + states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_1') | float + states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_2') | float }}"
|
||||
|
@@ -1,10 +1,10 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- unique_id: office_media_button_1
|
||||
name: "Office Media Button"
|
||||
state_topic: "tele/tasmo-zigb-6440-1/9CB5/SENSOR"
|
||||
unit_of_measurement: "Press"
|
||||
value_template: "{{ value_json.ZbReceived.Office_Media_Button.Power }}"
|
||||
#mqtt:
|
||||
# sensor:
|
||||
# - unique_id: office_media_button_1
|
||||
# name: "Office Media Button"
|
||||
# state_topic: "tele/tasmo-zigb-6440-1/9CB5/SENSOR"
|
||||
# unit_of_measurement: "Press"
|
||||
# value_template: "{{ value_json.ZbReceived.Office_Media_Button.Power }}"
|
||||
|
||||
automation:
|
||||
- id: "1629271273952"
|
||||
@@ -12,8 +12,8 @@ automation:
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.office_media_button
|
||||
to: "1"
|
||||
entity_id: sensor.media_button_office_zbt04_action
|
||||
to: "single"
|
||||
condition: []
|
||||
action:
|
||||
- service: media_player.media_pause
|
||||
@@ -25,38 +25,38 @@ automation:
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.office_media_button
|
||||
to: "2"
|
||||
entity_id: sensor.media_button_office_zbt04_action
|
||||
to: "double"
|
||||
condition: []
|
||||
action:
|
||||
- service: media_player.media_play
|
||||
target:
|
||||
device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
|
||||
mode: single
|
||||
- id: "1629271273958"
|
||||
alias: Pause office TV on MQTT
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: viewroad-commands/officetv/action
|
||||
payload: pause
|
||||
encoding: utf-8
|
||||
condition: []
|
||||
action:
|
||||
- service: media_player.media_pause
|
||||
target:
|
||||
device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
|
||||
mode: single
|
||||
- id: "1630969028384"
|
||||
alias: Skip Forward 30 Seconds on Media Button
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.office_media_button
|
||||
to: "3"
|
||||
condition: []
|
||||
action:
|
||||
- service: media_player.media_seek
|
||||
data:
|
||||
seek_position: 30
|
||||
mode: single
|
||||
# - id: "1629271273958"
|
||||
# alias: Pause office TV on MQTT
|
||||
# description: ""
|
||||
# trigger:
|
||||
# - platform: mqtt
|
||||
# topic: viewroad-commands/officetv/action
|
||||
# payload: pause
|
||||
# encoding: utf-8
|
||||
# condition: []
|
||||
# action:
|
||||
# - service: media_player.media_pause
|
||||
# target:
|
||||
# device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
|
||||
# mode: single
|
||||
# - id: "1630969028384"
|
||||
# alias: Skip Forward 30 Seconds on Media Button
|
||||
# description: ""
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: sensor.media_button_office_zbt04_action
|
||||
# to: "triple"
|
||||
# condition: []
|
||||
# action:
|
||||
# - service: media_player.media_seek
|
||||
# data:
|
||||
# seek_position: 30
|
||||
# mode: single
|
||||
|
193
packages/raspberry_pi_monitor.yaml
Normal file
193
packages/raspberry_pi_monitor.yaml
Normal file
@@ -0,0 +1,193 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/cpu-temp"
|
||||
name: "CCTVQuad1 CPU Temperature"
|
||||
unit_of_measurement: "°C"
|
||||
icon: mdi:thermometer
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/cpu-use"
|
||||
name: "CCTVQuad1 CPU Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:cpu-32-bit
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/ram-use"
|
||||
name: "CCTVQuad1 RAM Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:raspberry-pi
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/disk-use"
|
||||
name: "CCTVQuad1 Disk Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:harddisk
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/uptime"
|
||||
name: "CCTVQuad1 Uptime"
|
||||
icon: mdi:timer
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/last-seen"
|
||||
name: "CCTVQuad1 Last Seen"
|
||||
icon: mdi:calendar-clock
|
||||
- state_topic: "viewroad-status/rpis/cctvquad1/ipv4-address"
|
||||
name: "CCTVQuad1 IPv4 Address"
|
||||
icon: mdi:server-network
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/cpu-temp"
|
||||
name: "CCTVQuad2 CPU Temperature"
|
||||
unit_of_measurement: "°C"
|
||||
icon: mdi:thermometer
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/cpu-use"
|
||||
name: "CCTVQuad2 CPU Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:cpu-32-bit
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/ram-use"
|
||||
name: "CCTVQuad2 RAM Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:raspberry-pi
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/disk-use"
|
||||
name: "CCTVQuad2 Disk Use"
|
||||
unit_of_measurement: "%"
|
||||
icon: mdi:harddisk
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/uptime"
|
||||
name: "CCTVQuad2 Uptime"
|
||||
icon: mdi:timer
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/last-seen"
|
||||
name: "CCTVQuad2 Last Seen"
|
||||
icon: mdi:calendar-clock
|
||||
- state_topic: "viewroad-status/rpis/cctvquad2/ipv4-address"
|
||||
name: "CCTVQuad2 IPv4 Address"
|
||||
icon: mdi:server-network
|
||||
|
||||
switch:
|
||||
- name: "CCTVQuad1 Reboot"
|
||||
state_topic: "viewroad-status/rpis/cctvquad1/reboot"
|
||||
command_topic: "viewroad-commands/rpis/cctvquad1/reboot/set"
|
||||
qos: 1
|
||||
optimistic: false
|
||||
retain: false
|
||||
icon: mdi:refresh
|
||||
- name: "CCTVQuad1 Shutdown"
|
||||
state_topic: "viewroad-status/rpis/cctvquad1/shutdown"
|
||||
command_topic: "viewroad-commands/rpis/cctvquad1/shutdown/set"
|
||||
qos: 1
|
||||
optimistic: false
|
||||
retain: false
|
||||
icon: mdi:close-network
|
||||
- name: "CCTVQuad2 Reboot"
|
||||
state_topic: "viewroad-status/rpis/cctvquad2/reboot"
|
||||
command_topic: "viewroad-commands/rpis/cctvquad2/reboot/set"
|
||||
qos: 1
|
||||
optimistic: false
|
||||
retain: false
|
||||
icon: mdi:refresh
|
||||
- name: "CCTVQuad2 Shutdown"
|
||||
state_topic: "viewroad-status/rpis/cctvquad2/shutdown"
|
||||
command_topic: "viewroad-commands/rpis/cctvquad2/shutdown/set"
|
||||
qos: 1
|
||||
optimistic: false
|
||||
retain: false
|
||||
icon: mdi:close-network
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
pi_cctvquad1_on:
|
||||
friendly_name: "CCTV Quad1 Available"
|
||||
value_template: >-
|
||||
{%- if states( 'sensor.cctvquad1_last_seen' ) != 'unknown'
|
||||
and ( as_timestamp( now() ) - as_timestamp( states( 'sensor.cctvquad1_last_seen' ) ) ) <= 180 -%}
|
||||
True
|
||||
{%- else -%}
|
||||
False
|
||||
{%- endif %}
|
||||
- platform: template
|
||||
sensors:
|
||||
pi_cctvquad2_on:
|
||||
friendly_name: "CCTV Quad2 Available"
|
||||
value_template: >-
|
||||
{%- if states( 'sensor.cctvquad2_last_seen' ) != 'unknown'
|
||||
and ( as_timestamp( now() ) - as_timestamp( states( 'sensor.cctvquad2_last_seen' ) ) ) <= 180 -%}
|
||||
True
|
||||
{%- else -%}
|
||||
False
|
||||
{%- endif %}
|
||||
|
||||
group:
|
||||
pi_cctvquad1_on:
|
||||
name: "RPi CCTV Quad1"
|
||||
#control: hidden
|
||||
entities:
|
||||
- sensor.cctvquad1_ipv4_address
|
||||
- sensor.cctvquad1_uptime
|
||||
- switch.cctvquad1_reboot
|
||||
- switch.cctvquad1_shutdown
|
||||
- sensor.cctvquad1_cpu_temperature
|
||||
- sensor.cctvquad1_cpu_use
|
||||
- sensor.cctvquad1_ram_use
|
||||
- sensor.cctvquad1_disk_use
|
||||
- sensor.cctvquad1_last_seen
|
||||
|
||||
pi_cctvquad2_on:
|
||||
name: "RPi CCTV Quad2"
|
||||
#control: hidden
|
||||
entities:
|
||||
- sensor.cctvquad2_ipv4_address
|
||||
- sensor.cctvquad2_uptime
|
||||
- switch.cctvquad2_reboot
|
||||
- switch.cctvquad2_shutdown
|
||||
- sensor.cctvquad2_cpu_temperature
|
||||
- sensor.cctvquad2_cpu_use
|
||||
- sensor.cctvquad2_ram_use
|
||||
- sensor.cctvquad2_disk_use
|
||||
- sensor.cctvquad2_last_seen
|
||||
#automation:
|
||||
# - alias: "Home Assistant Start"
|
||||
# trigger:
|
||||
# platform: homeassistant
|
||||
# event: start
|
||||
# action:
|
||||
# - service: group.set_visibility
|
||||
# entity_id:
|
||||
# - group.pi_cctvquad1_on
|
||||
# data:
|
||||
# visible: False
|
||||
# - alias: "pi is on"
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id:
|
||||
# - binary_sensor.pi_cctvquad1_on
|
||||
# from: "off"
|
||||
# to: "on"
|
||||
# action:
|
||||
# - service: group.set_visibility
|
||||
# data_template:
|
||||
# entity_id: "group.pi_{{ trigger.entity_id | replace( 'binary_sensor.pi_', '' ) }}"
|
||||
# visible: True
|
||||
# - service: group.set_visibility
|
||||
# data_template:
|
||||
# entity_id: "group.pi_{{ trigger.entity_id | replace( 'binary_sensor.pi_', '' ) | replace( '_on', '' ) }}_off"
|
||||
# visible: False
|
||||
# - alias: "pi not seen"
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id:
|
||||
# - binary_sensor.pi_cctvquad1_on
|
||||
# from: "on"
|
||||
# to: "off"
|
||||
# action:
|
||||
# - service: group.set_visibility
|
||||
# data_template:
|
||||
# entity_id: "group.pi_{{ trigger.entity_id | replace( 'binary_sensor.pi_', '' ) | replace( '_on', '' ) }}_on"
|
||||
# visible: False
|
||||
# - service: group.set_visibility
|
||||
# data_template:
|
||||
# entity_id: "group.pi_{{ trigger.entity_id | replace( 'binary_sensor.pi_', '' ) | replace( '_on', '' ) }}_off"
|
||||
# visible: True
|
||||
#- service: notify.ios_PHONENAME
|
||||
#data_template:
|
||||
#title: "Pi Offline"
|
||||
#message: "{{ trigger.entity_id | replace( 'binary_sensor.pi_', '' ) | replace( '_on', '' ) }}"
|
||||
#- alias: 'pi disk use'
|
||||
#trigger:
|
||||
#platform: numeric_state
|
||||
#entity_id:
|
||||
#- sensor.cctvquad1_disk_use
|
||||
#above: 90
|
||||
#action:
|
||||
#- service: notify.ios_PHONENAME
|
||||
#data_template:
|
||||
#title: "Pi Disk Use > 90%"
|
||||
#message: "{{ trigger.entity_id | replace( 'sensor.', '' ) | replace( '_disk_use', '' ) }}"
|
@@ -1,7 +1 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
electricity_power_total:
|
||||
friendly_name: "Electricity Power Total"
|
||||
unit_of_measurement: "W"
|
||||
value_template: "{{ states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_0') |float + states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_1') | float + states('sensor.tasmo_wemosd1_7280_powermon_1_energy_power_2') | float }}"
|
||||
|
||||
|
Reference in New Issue
Block a user