From 0f54f6dcf2ff434e013ddb67bdf6748529b17fbc Mon Sep 17 00:00:00 2001 From: Ben Charlton Date: Tue, 22 Aug 2017 18:36:26 +0000 Subject: [PATCH] Import working config --- automations.yaml | 50 ++++++++++++++++++++++++++++++ configuration.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++++++ customise.yaml | 52 +++++++++++++++++++++++++++++++ groups.yaml | 27 ++++++++++++++++ notify.yaml | 5 +++ sensors.yaml | 70 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 281 insertions(+) create mode 100644 automations.yaml create mode 100644 configuration.yaml create mode 100644 customise.yaml create mode 100644 groups.yaml create mode 100644 notify.yaml create mode 100644 sensors.yaml diff --git a/automations.yaml b/automations.yaml new file mode 100644 index 0000000..58fc5a0 --- /dev/null +++ b/automations.yaml @@ -0,0 +1,50 @@ +#- alias: Front Door Open + #trigger: + #platform: state + #entity_id: binary_sensor.fibaro_system_fgk10x_door_opening_sensor_sensor + #condition: + #- condition: state + #entity_id: group.presence + #state: 'not home' + #action: + #service: notify.all_phones + #data: + #message: "Front Door Sensor: {{ states.binary_sensor.fibaro_system_fgk10x_door_opening_sensor_sensor.state }}" + #data: + #push: + #badge: 5 + +- alias: Front Door Open + trigger: + platform: state + entity_id: sensor.front_door + condition: + - condition: state + entity_id: group.presence + state: 'not home' + action: + service: notify.all_phones + data: + message: "Front Door: {{ states.sensor.front_door.state }}" + data: + push: + badge: 5 + + +- alias: Back Door Open + trigger: + platform: state + entity_id: sensor.back_door + condition: + - condition: state + entity_id: group.presence + state: 'not home' + action: + service: notify.all_phones + data: + message: "Back Door Sensor: {{ states.sensor.back_door.state }}" + data: + push: + badge: 5 + + diff --git a/configuration.yaml b/configuration.yaml new file mode 100644 index 0000000..6cddb74 --- /dev/null +++ b/configuration.yaml @@ -0,0 +1,77 @@ +homeassistant: + # Name of the location where Home Assistant is running + name: Home + # Location required to calculate the time the sun rises and sets + latitude: !secret home_lat + longitude: !secret home_long + # Impacts weather/sunrise data (altitude above sea level in meters) + elevation: 34 + # metric for Metric, imperial for Imperial + unit_system: metric + # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + time_zone: Europe/London + customize: !include customise.yaml + +# Show links to resources in log and frontend +introduction: + +# Enables the frontend +frontend: + +# Enables configuration UI +config: + +http: + # Uncomment this to add a password (recommended!) + api_password: !secret http_password + # Uncomment this if you are using SSL or running in Docker etc + # base_url: + ssl_certificate: /home/homeassistant/fullchain.pem + ssl_key: /home/homeassistant/privkey.pem + + +# Checks for available updates +# Note: This component will send some information about your system to +# the developers to assist with development of Home Assistant. +# For more information, please see: +# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/ +updater: + # Optional, allows Home Assistant developers to focus on popular components. + # include_used_components: true + +# Discover some devices automatically +discovery: + +# Allows you to issue voice commands from the frontend in enabled browsers +conversation: + +# Enables support for tracking state changes over time. +history: + +# View all events in a logbook +logbook: + +# Track the sun +sun: + +# Weather Prediction +sensor: !include sensors.yaml + +notify: !include notify.yaml + +# Text to speech +tts: + platform: google + +group: !include groups.yaml +automation: !include automations.yaml + +zwave: + usb_path: /dev/ttyACM0 + network_key: !secret zwave_key + +camera: + - platform: ffmpeg + input: !secret hall_camera_url + +ios: diff --git a/customise.yaml b/customise.yaml new file mode 100644 index 0000000..96ca959 --- /dev/null +++ b/customise.yaml @@ -0,0 +1,52 @@ +### Customize ### +### For Timezones : http://en.wikipedia.org/wiki/List_of_tz_database_time_zones +### For Icons: : https://materialdesignicons.com/ + +### MultiSensor ### + sensor.aeotec_zw100_multisensor_6_temperature: + friendly_name: Temperature + sensor.aeotec_zw100_multisensor_6_relative_humidity: + friendly_name: Humidity + icon: mdi:water + sensor.aeotec_zw100_multisensor_6_luminance: + friendly_name: Luminance + icon: mdi:weather-sunny + sensor.aeotec_zw100_multisensor_6_ultraviolet: + friendly_name: Ultraviolet + icon: mdi:sunglasses + sensor.aeotec_zw100_multisensor_6_sensor: + friendly_name: Sensor + sensor.aeotec_zw100_multisensor_6_alarm_level: + hidden: true + sensor.aeotec_zw100_multisensor_6_alarm_type: + hidden: true + sensor.aeotec_zw100_multisensor_6_sourcenodeid: + hidden: true + sensor.aeotec_zw100_multisensor_6_burglar: + friendly_name: Motion sensor + icon: mdi:run + binary_sensor.aeotec_zw100_multisensor_6_sensor: + friendly_name: Motion Detected + + #binary_sensor.fibaro_system_fgk10x_door_opening_sensor_sensor: + #friendly_name: Front Door + #binary_sensor.aeotec_zw112_door_window_sensor_6_sensor: + # friendly_name: Back Door + + sensor.hera_battery_state: + hidden: true + sensor.hera_battery_level: + hidden: true + sensor.bcc6_battery_state: + hidden: true + sensor.bcc6_battery_level: + hidden: true + sensor.athena_battery_state: + hidden: true + sensor.athena_battery_level: + hidden: true + + device_tracker.bcc6: + friendly_name: Ben's Phone + device_tracker.hera: + friendly_name: Lizzie's Phone diff --git a/groups.yaml b/groups.yaml new file mode 100644 index 0000000..82b1608 --- /dev/null +++ b/groups.yaml @@ -0,0 +1,27 @@ +Multisensor: + - sensor.aeotec_zw100_multisensor_6_temperature + - sensor.aeotec_zw100_multisensor_6_relative_humidity + - sensor.aeotec_zw100_multisensor_6_luminance + - sensor.aeotec_zw100_multisensor_6_ultraviolet + - sensor.aeotec_zw100_multisensor_6_sensor + - sensor.aeotec_zw100_multisensor_6_burglar + - binary_sensor.aeotec_zw100_multisensor_6_sensor + +Nova: + - sensor.cpu_use + - sensor.average_load_5m + - sensor.disk_use_home + - sensor.ram_free + - sensor.cpu_temperature + +Doors: + - sensor.front_door + - sensor.back_door + +Presence: + - device_tracker.bcc6 + - device_tracker.hera + +#Batteries: + #- zwave.fibaro_system_fgfs101_flood_sensor.battery_level + diff --git a/notify.yaml b/notify.yaml new file mode 100644 index 0000000..4bfd729 --- /dev/null +++ b/notify.yaml @@ -0,0 +1,5 @@ +- name: all_phones + platform: group + services: + - service: ios_bcc6 +# - service: ios_hera diff --git a/sensors.yaml b/sensors.yaml new file mode 100644 index 0000000..ae62529 --- /dev/null +++ b/sensors.yaml @@ -0,0 +1,70 @@ +- platform: yr + + +- platform: systemmonitor + resources: + - type: disk_use_percent + arg: /home + - type: memory_free + - type: processor_use + - type: load_5m + +- platform: command_line + name: CPU Temperature + command: "cat /sys/class/thermal/thermal_zone0/temp" + unit_of_measurement: "°C" + value_template: '{{ value | multiply(0.001) | round(1) }}' + + +- platform: template + sensors: + front_door: + value_template: '{% if states.binary_sensor.fibaro_system_fgk10x_door_opening_sensor_sensor %} + {% if states.binary_sensor.fibaro_system_fgk10x_door_opening_sensor_sensor.state == "on" %} + Open + {% else %} + Closed + {% endif %} + {% else %} + n/a + {% endif %}' + friendly_name: 'Front Door' + +- platform: template + sensors: + back_door: + value_template: '{% if states.binary_sensor.aeotec_zw112_door_window_sensor_6_sensor %} + {% if states.binary_sensor.aeotec_zw112_door_window_sensor_6_sensor.state == "on" %} + Open + {% else %} + Closed + {% endif %} + {% else %} + n/a + {% endif %}' + friendly_name: 'Back Door' + +- platform: template + sensors: + batt_frontdoor: + friendly_name: 'Front Door Battery' + value_template: '{{ states.zwave.fibaro_system_fgk10x_door_opening_sensor_sensor.attributes.battery_level }}' + unit_of_measurement: '%' + entity_id: zwave.fibaro_system_fgk10x_door_opening_sensor_sensor + +- platform: template + sensors: + batt_flood: + friendly_name: 'Flood Sensor Battery' + value_template: '{{ states.zwave.fibaro_system_fgfs101_flood_sensor.attributes.battery_level }}' + unit_of_measurement: '%' + entity_id: zwave.fibaro_system_fgfs101_flood_sensor + +- platform: template + sensors: + batt_back_door: + friendly_name: 'Back Door Battery' + value_template: '{{ states.zwave.aeotec_zw112_door_window_sensor_6_sensor.attributes.battery_level }}' + unit_of_measurement: '%' + entity_id: zwave.aeotec_zw112_door_window_sensor_6_sensor +