From: Giorgio Ravera Date: Fri, 3 Jun 2022 12:52:01 +0000 (+0200) Subject: Moved google calendar and netatmo to UI, added media_source, removed hass update... X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=1b2618339a042d448ae71abf76fe403869e3be0b;p=homeassistant.git Moved google calendar and netatmo to UI, added media_source, removed hass update notifications, migrated mqtt light to new domain --- diff --git a/.secrets_travis.yaml b/.secrets_travis.yaml index a716f721..9fb08150 100644 --- a/.secrets_travis.yaml +++ b/.secrets_travis.yaml @@ -32,9 +32,6 @@ google_pin: "0000" google_maps_username: email@domain.com google_maps_password: password -google_calendar_id: id -google_calendar_secret: password - proxmox_host: host proxmox_user: user proxmox_password: password @@ -57,9 +54,6 @@ hacs_token: 0 mb_vin: vin -netatmo_client_id: client_id -netatmo_client_secret: password - telegram_bot_name: "name_bot" telegram_bot_username: "telegram_bot" telegram_bot_access_token: token diff --git a/README.md b/README.md index 99b9d3df..07f1baf9 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ My server is an Intel NUC (NUC10i5FNH) with [Proxmox Virtual Environment](https: * LG webOS Smart TV * Mercedes Me * MQTT + * Netatmo * Shelly Devices (with the exception of Shelly Bulb) * Sony Bravia * SpeedTest diff --git a/automations/update_notifications.yaml b/automations/update_notifications.yaml index 6b491a3d..48d25dd1 100644 --- a/automations/update_notifications.yaml +++ b/automations/update_notifications.yaml @@ -1,34 +1,3 @@ -###################################################################### -# Update Notification: Home Assistant -###################################################################### - -- alias: "Update Notification: Home Assistant" - - trigger: - - platform: state - entity_id: binary_sensor.updater - to: 'on' - - - platform: homeassistant - event: start - - condition: - condition: state - entity_id: binary_sensor.updater - state: 'on' - - action: - - delay: '00:00:5' - - service: script.notify_text - data_template: - title: "Home Assistant - Aggiornamento" - message: "E' disponibile un aggiornamento per Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }}. {{now().strftime('%Y-%m-%d %I:%M %p')}}" - notification_id: "update" - enable_persistent: true - - - service: input_boolean.turn_on - entity_id: input_boolean.update_homeassistant - ###################################################################### # Update Notification: Shelly ###################################################################### diff --git a/components/google_calendar.yaml b/components/google_calendar.yaml deleted file mode 100644 index aa837afc..00000000 --- a/components/google_calendar.yaml +++ /dev/null @@ -1,6 +0,0 @@ -###################################################################### -# Component: Google Calendar Integration -###################################################################### - -client_id: !secret google_calendar_id -client_secret: !secret google_calendar_secret diff --git a/components/netatmo.yaml b/components/netatmo.yaml deleted file mode 100644 index bfccae5d..00000000 --- a/components/netatmo.yaml +++ /dev/null @@ -1,6 +0,0 @@ -###################################################################### -# Component: Netatmo -###################################################################### - -client_id: !secret netatmo_client_id -client_secret: !secret netatmo_client_secret diff --git a/configuration.yaml b/configuration.yaml index 6847df04..237dac75 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -14,11 +14,15 @@ homeassistant: unit_system: metric # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones time_zone: Europe/Rome + # Pick your currency code from the column Code of Wikipedia’s list of ISO 4217 active codes + currency: EUR # URL - internal_url: !secret base_url external_url: !secret base_url + internal_url: !secret base_url # Customization folder customize: !include_dir_merge_named customizations/ + media_dirs: + media: "media" # Packages: packages: !include_dir_named packages/ @@ -72,7 +76,7 @@ input_text: !include_dir_merge_named input_text/ map: # Media Source -#media_source: +media_source: # Mobile App Support mobile_app: @@ -104,15 +108,6 @@ tag: # Timer timer: -# 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 - # Webhooks webhook: @@ -204,17 +199,15 @@ weather: !include components/weather.yaml # Google Assistant google_assistant: !include components/google_assistant.yaml -# Google Calendar -google: !include components/google_calendar.yaml - -# Proxmox -proxmoxve: !include components/proxmox.yaml - # Homekit homekit: !include components/homekit.yaml -# Netatmo -netatmo: !include components/netatmo.yaml +# MQTT +mqtt: + light: !include_dir_merge_list mqtt/light/ + +# Proxmox +proxmoxve: !include components/proxmox.yaml # Telegram telegram_bot: !include components/telegram.yaml diff --git a/light/sala.yaml b/light/sala.yaml index 3b834b56..6191d538 100644 --- a/light/sala.yaml +++ b/light/sala.yaml @@ -1,130 +1,3 @@ -###################################################################### -# Living Room Couch Light (Color) -###################################################################### - -- platform: mqtt - name: Luce Divano - schema: template - command_topic: "shellies/shellybulb-BC8610/color/0/set" - state_topic: "shellies/shellybulb-BC8610/color/0/status" - command_on_template: > - { - "turn": "on", - "mode": "color", - {%- if red is defined and green is defined and blue is defined -%} - "red": {{ red }}, - "green": {{ green }}, - "blue": {{ blue }}, - {%- endif -%} - {%- if white_value is defined -%} - "white": {{ white_value }}, - {%- endif -%} - {%- if brightness is defined -%} - "gain": {{ (brightness/255*100) | int }}, - {%- endif -%} - {%- if effect is defined -%} - {%- if effect == 'Pioggia di Meteore' -%} - "effect": 1 - {%- elif effect == 'Cambio Graduale' -%} - "effect": 2 - {%- elif effect == 'Respiro' -%} - "effect": 3 - {%- elif effect == 'Flash' -%} - "effect": 4 - {%- elif effect == 'On/Off Graduale' -%} - "effect": 5 - {%- elif effect == 'Rosso/Verde' -%} - "effect": 6 - {%- else -%} - "effect": 0 - {%- endif -%} - {%- else -%} - "effect": 0 - {%- endif -%} - } - command_off_template: > - { - "turn": "off", - "mode": "color" - } - state_template: > - {% if value_json.ison == true and value_json.mode == "color" %} - on - {% else %} - off - {% endif %} - brightness_template: '{{ (value_json.gain/100*255) | int }}' - red_template: '{{ value_json.red }}' - green_template: '{{ value_json.green }}' - blue_template: '{{ value_json.blue }}' - white_value_template: '{{ value_json.white }}' - effect_template: > - {%- if value_json.effect == 1 -%} - Pioggia di Meteore - {%- elif value_json.effect == 2 -%} - Cambio Graduale - {%- elif value_json.effect == 3 -%} - Respiro - {%- elif value_json.effect == 4 -%} - Flash - {%- elif value_json.effect == 5 -%} - On/Off Graduale - {%- elif value_json.effect == 6 -%} - Rosso/Verde - {%- else -%} - Off - {%- endif -%} - effect_list: - - "Off" - - Pioggia di Meteore - - Cambio Graduale - - Respiro - - Flash - - On/Off Graduale - - Rosso/Verde - retain: false - qos: 0 - optimistic: false - -###################################################################### -# Living Room Couch Light (White) -###################################################################### - -#- platform: mqtt -# name: Luce Divano Bianca -# schema: template -# command_topic: "shellies/shellybulb-BC8610/color/0/set" -# state_topic: "shellies/shellybulb-BC8610/color/0/status" -# command_on_template: > -# { -# "turn": "on", -# "mode": "white", -# {%- if color_temp is defined -%} -# "temp": {{ (1000000/(((float(color_temp)-153)/354*180)+153)-35) | int }}, -# {%- endif -%} -# {%- if brightness is defined -%} -# "brightness": {{ (brightness/255*100) | int }}, -# {%- endif -%} -# "effect": 0 -# } -# command_off_template: > -# { -# "turn": "off", -# "mode": "white", -# "effect": 0 -# } -# state_template: > -# {% if value_json.ison == true and value_json.mode == "white" %} -# on -# {% else %} -# off -# {% endif %} -# brightness_template: '{{ (value_json.brightness/100*255)|int }}' -# color_temp_template: "{{ (1000000/(((float(value_json.temp)-3000)/3500*4500)+2000)) | int }}" -# retain: false -# qos: 0 -# optimistic: false - ###################################################################### # Living Room Global ###################################################################### diff --git a/mqtt/light/sala.yaml b/mqtt/light/sala.yaml new file mode 100644 index 00000000..dd96c526 --- /dev/null +++ b/mqtt/light/sala.yaml @@ -0,0 +1,124 @@ +###################################################################### +# Living Room Couch Light (Color) +###################################################################### + +- name: Luce Divano + schema: template + command_topic: "shellies/shellybulb-BC8610/color/0/set" + state_topic: "shellies/shellybulb-BC8610/color/0/status" + command_on_template: > + { + "turn": "on", + "mode": "color", + {%- if red is defined and green is defined and blue is defined -%} + "red": {{ red }}, + "green": {{ green }}, + "blue": {{ blue }}, + {%- endif -%} + {%- if white_value is defined -%} + "white": {{ white_value }}, + {%- endif -%} + {%- if brightness is defined -%} + "gain": {{ (brightness/255*100) | int }}, + {%- endif -%} + {%- if effect is defined -%} + {%- if effect == 'Pioggia di Meteore' -%} + "effect": 1 + {%- elif effect == 'Cambio Graduale' -%} + "effect": 2 + {%- elif effect == 'Respiro' -%} + "effect": 3 + {%- elif effect == 'Flash' -%} + "effect": 4 + {%- elif effect == 'On/Off Graduale' -%} + "effect": 5 + {%- elif effect == 'Rosso/Verde' -%} + "effect": 6 + {%- else -%} + "effect": 0 + {%- endif -%} + {%- else -%} + "effect": 0 + {%- endif -%} + } + command_off_template: > + { + "turn": "off", + "mode": "color" + } + state_template: > + {% if value_json.ison == true and value_json.mode == "color" %} + on + {% else %} + off + {% endif %} + brightness_template: '{{ (value_json.gain/100*255) | int }}' + red_template: '{{ value_json.red }}' + green_template: '{{ value_json.green }}' + blue_template: '{{ value_json.blue }}' + white_value_template: '{{ value_json.white }}' + effect_template: > + {%- if value_json.effect == 1 -%} + Pioggia di Meteore + {%- elif value_json.effect == 2 -%} + Cambio Graduale + {%- elif value_json.effect == 3 -%} + Respiro + {%- elif value_json.effect == 4 -%} + Flash + {%- elif value_json.effect == 5 -%} + On/Off Graduale + {%- elif value_json.effect == 6 -%} + Rosso/Verde + {%- else -%} + Off + {%- endif -%} + effect_list: + - "Off" + - Pioggia di Meteore + - Cambio Graduale + - Respiro + - Flash + - On/Off Graduale + - Rosso/Verde + retain: false + qos: 0 + optimistic: false + +###################################################################### +# Living Room Couch Light (White) +###################################################################### + +#- name: Luce Divano Bianca +# schema: template +# command_topic: "shellies/shellybulb-BC8610/color/0/set" +# state_topic: "shellies/shellybulb-BC8610/color/0/status" +# command_on_template: > +# { +# "turn": "on", +# "mode": "white", +# {%- if color_temp is defined -%} +# "temp": {{ (1000000/(((float(color_temp)-153)/354*180)+153)-35) | int }}, +# {%- endif -%} +# {%- if brightness is defined -%} +# "brightness": {{ (brightness/255*100) | int }}, +# {%- endif -%} +# "effect": 0 +# } +# command_off_template: > +# { +# "turn": "off", +# "mode": "white", +# "effect": 0 +# } +# state_template: > +# {% if value_json.ison == true and value_json.mode == "white" %} +# on +# {% else %} +# off +# {% endif %} +# brightness_template: '{{ (value_json.brightness/100*255)|int }}' +# color_temp_template: "{{ (1000000/(((float(value_json.temp)-3000)/3500*4500)+2000)) | int }}" +# retain: false +# qos: 0 +# optimistic: false