Home Automation – Temperature Trigger

on

Now I have my Home Automation server working and 95% of my devices moved over, it was time to setup some of the automatons I wanted.

  • Turn on and off Fans when the temperature hits a certain temperature
  • Lock / Unlock the door via presence detection – working on
  • Monitor the power of my Washing Machine – working on

 

Turn on and off Fans

I was investigating the use of the weather.home entity and was not having any luck with selecting it as the numeric state in an automation. I found I needed to use a template to parse out the temperature. After some Googling, I found that I could create the following sensor in my sensors.yaml. Then I found it only updates the UI after a reboot.

- platform: template
  sensors:
    weather_temperature:
      friendly_name: "Weather Temperature"
      unit_of_measurement: 'degrees'
      value_template: "{{ state_attr('weather.home', 'temperature') }}"

This gives me a new Temperature widget and I can all it via weather_temperature in my automation.

During this I was also trying to get a Monoprice ZWave 15902 module running that I had connected to my Smart Things hub. It is actually a Zooz ZSE40 and a much better manual can be found here. This manual indicates the button on the bottom of the unit and it can be reset by pressing it in 10 times within a second. I also found that I did not have a good set of batteries, I was getting lights but not enough to transmit etc. It was a bang my head on the desk moment!

Now I had the unit reset, turned off my old Smart Things and added it to Home Assistant with no problem. Sensors were added in automatically and now I had a bunch of new sensors to ping. I updated my automatons and all is good.

- id: '1563584350224'
  alias: 'Turn on Fans '
  trigger:
  - above: '23'
    entity_id: sensor.vision_security_zp3111_multisensor_4in1_temperature
    platform: numeric_state
  condition: []
  action:
  - data:
      entity_id: switch.living_room_plug_1
    service: switch.turn_on

- id: '1563586342713'
  alias: Turn off Fans
  trigger:
  - below: '23'
    entity_id: sensor.vision_security_zp3111_multisensor_4in1_temperature
    platform: numeric_state
  condition: []
  action:
  - data:
      entity_id: light.sengled_e11_g13_030c8995_1
    service: switch.turn_off

Leave a Reply

Your email address will not be published. Required fields are marked *