From dfa1cd40b87e38deb8464e68c93c27aa671e9f4d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 24 Nov 2019 19:59:21 -0500 Subject: [PATCH] Made changes to comply with new version. Took out HTML API information. Also added upstairs temperature checker, and made changes to sleep light out automation. modified: configuration.yaml --- automations.yaml | 31 +++++++++++++++++++++++++------ configuration.yaml | 30 +++++++++++++++++++----------- ecobee.conf | 2 +- secrets.yaml | 2 +- ui-lovelace.yaml | 5 +++++ 5 files changed, 51 insertions(+), 19 deletions(-) diff --git a/automations.yaml b/automations.yaml index 3ac6f3a..b159c49 100644 --- a/automations.yaml +++ b/automations.yaml @@ -150,6 +150,25 @@ service_template: '{{ trigger.event.data.service }}' data_template: entity_id: '{{ trigger.event.data.entity_id }}' + +- alias: 'Sleep - Lights Off' + trigger: + platform: state + entity_id: sensor.sleep_Info + to: 'startsleep' + action: + - service: light.turn_off + entity_id: group.all_lights + +- alias: 'Sleep - Lights On' + trigger: + platform: state + entity_id: sensor.sleep_Info + to: 'stopsleep' + action: + - service: light.turn_on + entity_id: group.all_lights + @@ -166,10 +185,10 @@ condition: template value_template: "{% if not is_state('climate.home', 'off') %}true{% endif %}" action: - - service: climate.set_away_mode + - service: climate.set_preset_mode entity_id: climate.home data: - away_mode: 'on' + preset_mode: 'away' - service: notify.notify_dan data: title: 'Left House - Set thermostate to Away' @@ -194,10 +213,10 @@ - wed - thu action: - - service: climate.set_away_mode + - service: climate.set_preset_mode entity_id: climate.home data: - away_mode: 'off' + preset_mode: 'home' - service: notify.notify_dan data: title: 'Left Work - Set thermostate to Home' @@ -219,10 +238,10 @@ entity_id: input_boolean.thermostat_mode state: 'on' action: - - service: climate.set_away_mode + - service: climate.set_preset_mode entity_id: climate.home data: - away_mode: 'off' + preset_mode: 'home' - service: notify.notify_dan data: title: 'Back Home - Set thermostate to Home' diff --git a/configuration.yaml b/configuration.yaml index 89aa26f..d4162e9 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -24,7 +24,7 @@ lovelace: config: recorder: - db_url: postgresql://ha:password@192.168.86.184/homeassistant + db_url: postgresql://ha:password@docker.dandev.us/homeassistant purge_interval: 0 map: @@ -35,7 +35,7 @@ map: http: # Secrets are defined in the file secrets.yaml - api_password: ICYN30blah + #api_password: ICYN30blah # Uncomment this if you are using SSL/TLS, running in Docker container, etc. base_url: icyn30.duckdns.org:8123 @@ -105,21 +105,21 @@ sensor: # name: 'Guest' # state_topic: 'happy-bubbles/presence/ha' # away_timeout: 60 - - platform: sonarr - api_key: c544cae167164f11947c84ad4e04f61c - host: 192.168.86.20 - monitored_conditions: - - upcoming - - diskspace - days: 7 +# - platform: sonarr +# api_key: c544cae167164f11947c84ad4e04f61c +# host: 192.168.86.20 +# monitored_conditions: +# - upcoming +# - diskspace +# days: 7 - platform: template sensors: thermostat_current_status: - value_template: "{{ states.climate.home.attributes.operation }}" + value_template: "{{ states.climate.home.attributes.hvac_action }}" - platform: template sensors: thermostat_away_mode: - value_template: "{{ states.climate.home.attributes.away_mode }}" + value_template: "{{ states.climate.home.attributes.preset_mode }}" - platform: template sensors: thermostat_climate_mode: @@ -129,6 +129,13 @@ sensor: thermostat_outside_temperature: unit_of_measurement: "°F" value_template: "{{ float(states.weather.home.attributes.temperature) }}" + - platform: mqtt + state_topic: "upstairstemp/sensor/temp" + name: "Upstairs Temperature" + unit_of_measurement: "°F" + - platform: mqtt + state_topic: "DansPhone/sleepinfo" + name: "sleep Info" # Text to speech @@ -185,6 +192,7 @@ influxdb: - sensor.home_temperature - sensor.home_humidity - sensor.thermostat_outside_temperature + - sensor.upstairs_temperature - device_tracker.dan_dansphone - sensor.thermostate_current_status - sensor.thermostate_climate_mode diff --git a/ecobee.conf b/ecobee.conf index 7d1ca85..bcb3fe3 100644 --- a/ecobee.conf +++ b/ecobee.conf @@ -1 +1 @@ -{"API_KEY": "8DSRpsILZJNUIJXvSzY6C4ufrMQNQsHa", "ACCESS_TOKEN": "NYeTO1lPG1PenoI6qzYAmxUnB9e3NgRB", "REFRESH_TOKEN": "BeLlio7u4eG1itLJfolaGMTxmZeFtBlv", "AUTHORIZATION_CODE": "KFEN3CjbXBh6xUQ9zLiAPclzbp1rmxou"} \ No newline at end of file +{"API_KEY": "8DSRpsILZJNUIJXvSzY6C4ufrMQNQsHa", "ACCESS_TOKEN": "qS1UmssoXBWOilWVfciCTToHZPmsEytp", "REFRESH_TOKEN": "zwoyduZbxOe60UQAHfnVgO8LYJfM8YK1", "AUTHORIZATION_CODE": "KFEN3CjbXBh6xUQ9zLiAPclzbp1rmxou"} \ No newline at end of file diff --git a/secrets.yaml b/secrets.yaml index acb5cbc..db4858b 100644 --- a/secrets.yaml +++ b/secrets.yaml @@ -1,4 +1,4 @@ # Use this file to store secrets like usernames and passwords. # Learn more at https://home-assistant.io/docs/configuration/secrets/ -http_password: welcome +#http_password: welcome diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index a0637b1..59a196b 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -16,6 +16,7 @@ views: - sun.sun - sensor.home_temperature - sensor.home_humidity + - sensor.upstairs_temperature - type: entities entities: @@ -71,6 +72,8 @@ views: - automation.switch_off - automation.lights_on_when_home - automation.iftt + - automation.sleep_lights_off + - automation.sleep_lights_on - title: HVAC icon: mdi:temperature-fahrenheit @@ -84,11 +87,13 @@ views: entities: - sensor.home_temperature - sensor.home_humidity + - sensor.upstairs_temperature - type: history-graph entities: - sensor.home_temperature - sensor.thermostat_outside_temperature - sensor.home_humidity + - sensor.upstairs_temperature - type: entities entities: - entity: sensor.thermostat_current_status