mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-21 00:25:12 +00:00
Going Old School Non Pythonic Brute Force.
This commit is contained in:
parent
0d7239079d
commit
368ee5a94a
19
README.md
19
README.md
@ -89,6 +89,9 @@ https://i.imgur.com/xy10yI1.png
|
|||||||
|
|
||||||
resource for my RF switches. (MQTT) bit.ly/2gBiOqz
|
resource for my RF switches. (MQTT) bit.ly/2gBiOqz
|
||||||
|
|
||||||
|
https://www.reddit.com/r/amazonecho/comments/5he8o7/diy_ir_blaster_10_instructions_inside/?st=IWIDBGRT&sh=dd117f28
|
||||||
|
|
||||||
|
|
||||||
#Lab notes:
|
#Lab notes:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -127,22 +130,6 @@ Then simply use that in your light turn off automation:
|
|||||||
entity_id: light.hue_color_lamp_1
|
entity_id: light.hue_color_lamp_1
|
||||||
|
|
||||||
|
|
||||||
- automation:
|
|
||||||
alias: Random GLeft
|
|
||||||
initial_state: False
|
|
||||||
hide_entity: False
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
seconds: '/5'
|
|
||||||
action:
|
|
||||||
service: homeassistant.turn_on
|
|
||||||
entity_id:
|
|
||||||
- light.gright
|
|
||||||
data:
|
|
||||||
effect: random
|
|
||||||
transition: 1
|
|
||||||
brightness: 255
|
|
||||||
|
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
|
69
script/Reliability.yaml
Executable file
69
script/Reliability.yaml
Executable file
@ -0,0 +1,69 @@
|
|||||||
|
######################################################################################################
|
||||||
|
###Script to run every 30 minutes to check if 433 RF Switches are in the state they should be.
|
||||||
|
### Sample Call
|
||||||
|
# action:
|
||||||
|
# - service: script.reliability
|
||||||
|
######################################################################################################
|
||||||
|
|
||||||
|
# {% macro swTest(onoff) %} - service: switch.turn_{{ states(onoff) }}
|
||||||
|
# entity_id: {{ onoff }}{% endmacro %}
|
||||||
|
|
||||||
|
# switch_check:
|
||||||
|
# sequence:
|
||||||
|
# {{ swTest("switch.foyer_outlet") }}
|
||||||
|
# {{ swTest("switch.printer_outlet") }}
|
||||||
|
# {{ swTest("switch.garage_outlet") }}
|
||||||
|
# {{ swTest("switch.den_outlet") }}
|
||||||
|
# {{ swTest("switch.living_room_outlet") }}
|
||||||
|
# {{ swTest("switch.living_room_amp") }}
|
||||||
|
|
||||||
|
switch_check:
|
||||||
|
sequence:
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.foyer_outlet == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.foyer_outlet
|
||||||
|
- delay: '00:00:30'
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.printer_outlet == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.printer_outlet
|
||||||
|
- delay: '00:00:30'
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.garage_outlet == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.garage_outlet
|
||||||
|
- delay: '00:00:30'
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.den_outlet == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.den_outlet
|
||||||
|
- delay: '00:00:30'
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.kitchen_Accents == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.kitchen_Accents
|
||||||
|
- delay: '00:00:30'
|
||||||
|
- service_template: >
|
||||||
|
{% if states.switch.living_room_amp == 'on' %}
|
||||||
|
switch.turn_on
|
||||||
|
{% else %}
|
||||||
|
switch.turn_off
|
||||||
|
{% endif %}
|
||||||
|
entity_id: switch.living_room_amp
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
######################################################################################################
|
|
||||||
###Script to run every 30 minutes to check if 433 RF Switches are in the state they should be.
|
|
||||||
### Sample Call
|
|
||||||
# action:
|
|
||||||
# - service: script.reliability
|
|
||||||
######################################################################################################
|
|
||||||
|
|
||||||
{% macro swTest(onoff) %} - service: switch.turn_{{ states(onoff) }}
|
|
||||||
entity_id: {{ onoff }}{% endmacro %}
|
|
||||||
|
|
||||||
switch_check:
|
|
||||||
sequence:
|
|
||||||
{{ swTest("switch.foyer_outlet") }}
|
|
||||||
{{ swTest("switch.printer_outlet") }}
|
|
||||||
{{ swTest("switch.garage_outlet") }}
|
|
||||||
{{ swTest("switch.den_outlet") }}
|
|
||||||
{{ swTest("switch.living_room_outlet") }}
|
|
||||||
{{ swTest("switch.living_room_amp") }}
|
|
Loading…
x
Reference in New Issue
Block a user