Compare commits

..

No commits in common. "52a48817ea9f993884e3e20c9cd1dc7ac129d6ad" and "4d3a6f6e2168e1bb374ba2a55269401eabcea2d9" have entirely different histories.

2 changed files with 82 additions and 87 deletions

View file

@ -37,9 +37,6 @@ wifi:
# Connect to the first AP found. # Connect to the first AP found.
fast_connect: true fast_connect: true
network:
enable_ipv6: true
time: time:
- platform: homeassistant - platform: homeassistant
id: homeassistant_time id: homeassistant_time

View file

@ -32,89 +32,87 @@ remote_transmitter:
number: GPIO13 number: GPIO13
carrier_duty_percent: 100% carrier_duty_percent: 100%
packages: switch:
pm6006: - platform: template
switch: name: "PM6006 power"
- platform: template icon: "mdi:power"
name: "PM6006 power" lambda: |-
icon: "mdi:power" if (id(pm6006_power_sense).state) {
lambda: |- return true;
if (id(pm6006_power_sense).state) { } else {
return true; return false;
} else { }
return false; turn_on_action:
} if:
turn_on_action: condition:
if: binary_sensor.is_off: pm6006_power_sense
condition: then:
binary_sensor.is_off: pm6006_power_sense - remote_transmitter.transmit_rc5:
then: address: 0x10
- remote_transmitter.transmit_rc5: command: 0x0C
address: 0x10 # Needs to be sent twice to reliably wake up.
command: 0x0C repeat: 2
# Needs to be sent twice to reliably wake up. - delay: 500ms
repeat: 2 - if:
- delay: 500ms # However, sometimes it turns on then off. Turn on again if so.
- if: condition:
# However, sometimes it turns on then off. Turn on again if so. binary_sensor.is_off: pm6006_power_sense
condition: then:
binary_sensor.is_off: pm6006_power_sense - remote_transmitter.transmit_rc5:
then: address: 0x10
- remote_transmitter.transmit_rc5: command: 0x0C
address: 0x10 repeat: 2
command: 0x0C turn_off_action:
repeat: 2 if:
turn_off_action: condition:
if: binary_sensor.is_on: pm6006_power_sense
condition: then:
binary_sensor.is_on: pm6006_power_sense - remote_transmitter.transmit_rc5:
then: address: 0x10
- remote_transmitter.transmit_rc5: command: 0x0C
address: 0x10 repeat: 2
command: 0x0C - delay: 500ms
repeat: 2 - if:
- delay: 500ms # However, sometimes it doesn't turn off.
- if: condition:
# However, sometimes it doesn't turn off. binary_sensor.is_on: pm6006_power_sense
condition: then:
binary_sensor.is_on: pm6006_power_sense - remote_transmitter.transmit_rc5:
then: address: 0x10
- remote_transmitter.transmit_rc5: command: 0x0C
address: 0x10 repeat: 2
command: 0x0C - platform: template
repeat: 2 name: "PM6006 volume up"
- platform: template icon: "mdi:volume-plus"
name: "PM6006 volume up" turn_on_action:
icon: "mdi:volume-plus" remote_transmitter.transmit_rc5:
turn_on_action: address: 0x10
remote_transmitter.transmit_rc5: command: 16
address: 0x10 turn_off_action:
command: 16 remote_transmitter.transmit_rc5:
turn_off_action: address: 0x10
remote_transmitter.transmit_rc5: command: 16
address: 0x10 - platform: template
command: 16 name: "PM6006 volume down"
- platform: template icon: "mdi:volume-minus"
name: "PM6006 volume down" turn_on_action:
icon: "mdi:volume-minus" remote_transmitter.transmit_rc5:
turn_on_action: address: 0x10
remote_transmitter.transmit_rc5: command: 17
address: 0x10 turn_off_action:
command: 17 remote_transmitter.transmit_rc5:
turn_off_action: address: 0x10
remote_transmitter.transmit_rc5: command: 17
address: 0x10 - platform: template
command: 17 name: "PM6006 mute"
- platform: template icon: "mdi:volume-mute"
name: "PM6006 mute" turn_on_action:
icon: "mdi:volume-mute" remote_transmitter.transmit_rc5:
turn_on_action: address: 0x10
remote_transmitter.transmit_rc5: command: 13
address: 0x10 turn_off_action:
command: 13 remote_transmitter.transmit_rc5:
turn_off_action: address: 0x10
remote_transmitter.transmit_rc5: command: 13
address: 0x10
command: 13
<<: !include base.yaml <<: !include base.yaml