Temperature and humidity sensors with monitoring for home assistant
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
config-sample.json
ha-temp-monitor.py
home-assistant-temperature-monitor-fritzing.png
home-assistant-temperature-monitor.fzz

README.md

Home Assistant - Temperature & Humidity Sensors

My goal with this project was to create a device I could leave in the garage, which would push temperature and humidity data to Home Assistant. I also wanted to be able to enable a "monitor" mode when I turn on the heat in the garage so the system would alert me when a certain temperature was reached. See the working version on my blog.

Hardware used:

Home Assistant Temperature Monitor Fritzing

Installation

homeassistant:
  # You should have a bunch of other
  # settings here in your config
  customize:
    sensor.garage_temperature:
      icon: mdi:thermometer
    sensor.garage_humidity:
      icon: mdi:water-percent
	binary_sensor.garage_heat:
	  icon: mdi:radiator

mqtt_statestream:
  base_topic: ha
  include:
    entities:
      - input_number.garage_target
      - sensor.dark_sky_temperature
      - sensor.dark_sky_humidity

sensor:
  - platform: mqtt
    state_topic: 'garage/temperature'
    name: 'Garage Temperature'
    unit_of_measurement: '°F'

  - platform: mqtt
    state_topic: 'garage/humidity'
    name: 'Garage Humidity'
    unit_of_measurement: '%'

binary_sensor:
  - platform: mqtt
    name: Garage Heat
    state_topic: "garage/heat"
    payload_on: "on"
    payload_off: "off"

input_number:
  garage_target:
    name: Garage Target
    initial: 60
    min: 40
    max: 80
    step: 1
    mode: slider
    icon: mdi:target

group:
  garage:
    name: Garage
    control: hidden
    entities:
        - binary_sensor.garage_heat
        - sensor.garage_temperature
        - input_number.garage_target
        - sensor.garage_humidity

automation:
	- alias: 'Garage temp reached target temp'
	  trigger:
	    platform: state
		entity_id: sensor.garage_temperature
	  condition:
	    condition: and
		conditions:
  		  - condition: state
		    entity_id: binary_sensor.garage_heat
			state: 'on'
  		  - condition: template
		    value_template: '{{ states.sensor.garage_temperature.state >= states.input_number.garage_target.state }}'
	  action:
	    service: notify.ios_IPHONENAME
		data_template:
  		  title: "Garage Target Reached"
  		  message: "Temperature in the garage is {{ states.sensor.garage_temperature.state }}°F"