Hi guys & girls!
I’m trying to reduce the use of energy by my short term tenants specifically the abuse of air conditioners, and I was about to buy a ON/OFF TIME DELAY RELAY to hook up to my WEMO Maker until I found Home Assistant, and it blew up my mind!!
So… my Maker’s sensor is hooked to 4 magnetic switches (entrance door: 1x NC for closing and 1x NO for the deadbolt, balcony sliding doors: 2x NC).
What I need is that the air con only work if doors are closed, and the NO on the deadbolt will determine presence (which can only be locked from outside):
when switch.wemo_maker.attributes.sensor TURNS OFF switch.wemo_maker TURNS OFF with DELAY=5minutes
when switch.wemo_maker.attributes.sensor TURNS ON switch.wemo_maker TURNS ON with DELAY=2minutes
And perhaps it should be an automation, so I could turn it off if sh*t hit the fan… or air conditioner
I’m new here but I’ve tried many different approaches, mashing up codes but can get it to work, achieving something but got errors whenever I tried to add delay and changes on the sensors are visible by HA but doesn’t affect WEMO… the last one is:
# WEMO Maker
aircon_state:
value_template: >-
{%if states.switch.wemo_maker.attributes.sensor_state == 'on' %}
on
{%elif states.switch.wemo_maker.attributes.sensor_state == 'off' %}
off
{% else %}
unknown
{% endif %}
friendly_name: 'Air Conditioners State'
- platform: template
switches:
blind:
friendly_name: 'WEMO sensor'
value_template: "{{ is_state_attr('switch.wemo_maker', 'sensor_state', 'on') }}"
turn_on:
service: switch.turn_on
entity_id: switch.wemo_maker
turn_off:
service: switch.turn_off
entity_id: switch.wemo_maker
Also tried automation:
- alias: Turn on air conditioners 2 minutes after every doors are closed.
trigger:
platform: state
entity_id: sensor.aircon_state
to: 'on'
action:
service: homeassistant.turn_on
entity_id: switch.wemo_maker
- alias: Turn off air conditioners 5 minutes after a door opened.
trigger:
platform: state
entity_id: sensor.aircon_state
to: 'off'
action:
service: homeassistant.turn_off
entity_id: switch.wemo_maker