Update pc-switch.yaml
This commit is contained in:
parent
8ea9a64196
commit
e8b3801ba5
|
|
@ -1,17 +1,28 @@
|
||||||
|
substitutions:
|
||||||
|
name: "pc"
|
||||||
|
uppercase_name: "PC"
|
||||||
|
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: pc-switch
|
name: "${name}"
|
||||||
platform: ESP8266
|
platform: ESP8266
|
||||||
board: nodemcuv2
|
board: nodemcuv2
|
||||||
|
|
||||||
|
project:
|
||||||
|
name: "ajfriesen.pc-switch"
|
||||||
|
version: "1.0.0"
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
api:
|
api:
|
||||||
|
|
||||||
|
dashboard_import:
|
||||||
|
package_import_url: github://ajfriesen/pc-switch/pc-switch.yaml@main
|
||||||
|
|
||||||
# Put ota password here
|
# Put ota password here
|
||||||
ota:
|
ota:
|
||||||
password: ""
|
|
||||||
|
|
||||||
# Your wifi config
|
# Your wifi config
|
||||||
wifi:
|
wifi:
|
||||||
|
|
@ -53,13 +64,13 @@ binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: D0
|
pin: D0
|
||||||
id: pc_power_sensor
|
id: pc_power_sensor
|
||||||
name: "PC Power State"
|
name: "${name} Power State"
|
||||||
device_class: power
|
device_class: power
|
||||||
icon: "mdi:desktop-classic"
|
icon: "mdi:desktop-classic"
|
||||||
|
|
||||||
button:
|
button:
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "PC Power Button"
|
name: "${name} Power Button"
|
||||||
id: power_button
|
id: power_button
|
||||||
icon: "mdi:power-standby"
|
icon: "mdi:power-standby"
|
||||||
on_press:
|
on_press:
|
||||||
|
|
@ -67,7 +78,7 @@ button:
|
||||||
- switch.toggle: power_switch
|
- switch.toggle: power_switch
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "PC Force Power Off"
|
name: "${name} Force Power Off"
|
||||||
id: force_power_off
|
id: force_power_off
|
||||||
icon: "mdi:power-plug-off"
|
icon: "mdi:power-plug-off"
|
||||||
on_press:
|
on_press:
|
||||||
|
|
@ -75,7 +86,7 @@ button:
|
||||||
- switch.toggle: power_switch_force
|
- switch.toggle: power_switch_force
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "PC Reset Button"
|
name: "${name} Reset Button"
|
||||||
id: reset_button
|
id: reset_button
|
||||||
icon: "mdi:restart"
|
icon: "mdi:restart"
|
||||||
on_press:
|
on_press:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue