diff --git a/.HA_VERSION b/.HA_VERSION index 7447c12..21f04c6 100755 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2023.11.1 \ No newline at end of file +2024.11.1 \ No newline at end of file diff --git a/.storage/lovelace b/.storage/lovelace index 7a38eaa..2cd8a64 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -10,9 +10,9 @@ }, "views": [ { - "icon": "", - "title": "Floorplan", - "path": "floorplan", + "icon": "mdi:cellphone", + "title": "Portrait", + "path": "portrait", "theme": "My Dark UI", "subview": false, "type": "sidebar", @@ -603,7 +603,102 @@ "view_layout": { "position": "main" } + } + ], + "background": { + "image": "/local/homekit-bg-blue-red.jpg" + } + }, + { + "icon": "mdi:floor-plan", + "path": "tiles", + "theme": "default", + "title": "Tiles", + "type": "custom:vertical-layout", + "badges": [], + "cards": [ + { + "type": "tile", + "show_entity_picture": false, + "entity": "climate.heat_pump", + "features": [ + { + "type": "climate-hvac-modes", + "hvac_modes": [ + "off", + "auto", + "cool", + "heat", + "dry", + "fan_only" + ] + }, + { + "type": "target-temperature" + } + ] }, + { + "type": "tile", + "entity": "cover.office_curtain", + "features": [ + { + "type": "cover-open-close" + }, + { + "type": "cover-position" + } + ] + }, + { + "type": "vertical-stack", + "cards": [ + { + "type": "horizontal-stack", + "cards": [ + { + "type": "tile", + "entity": "person.eric", + "color": "deep-purple" + }, + { + "type": "tile", + "entity": "person.caro", + "color": "teal" + } + ] + }, + { + "type": "entities", + "entities": [ + { + "entity": "input_boolean.heat_eco_mode" + }, + { + "entity": "input_boolean.guest_mode" + } + ] + } + ] + }, + { + "type": "custom:sun-card" + }, + { + "entity": "weather.home", + "type": "weather-forecast", + "show_forecast": true, + "secondary_info_attribute": "humidity" + } + ] + }, + { + "type": "sidebar", + "path": "landscape", + "title": "Landscape", + "icon": "mdi:laptop", + "theme": "My Dark UI", + "cards": [ { "type": "custom:paper-buttons-row", "buttons": [ @@ -1185,90 +1280,10 @@ "position": "main" } } - ] - }, - { - "icon": "", - "path": "tiles", - "theme": "default", - "title": "Tiles", - "type": "custom:vertical-layout", - "badges": [], - "cards": [ - { - "type": "tile", - "show_entity_picture": false, - "entity": "climate.heat_pump", - "features": [ - { - "type": "climate-hvac-modes", - "hvac_modes": [ - "off", - "auto", - "cool", - "heat", - "dry", - "fan_only" - ] - }, - { - "type": "target-temperature" - } - ] - }, - { - "type": "tile", - "entity": "cover.office_curtain", - "features": [ - { - "type": "cover-open-close" - }, - { - "type": "cover-position" - } - ] - }, - { - "type": "vertical-stack", - "cards": [ - { - "type": "horizontal-stack", - "cards": [ - { - "type": "tile", - "entity": "person.eric", - "color": "deep-purple" - }, - { - "type": "tile", - "entity": "person.caro", - "color": "teal" - } - ] - }, - { - "type": "entities", - "entities": [ - { - "entity": "input_boolean.heat_eco_mode" - }, - { - "entity": "input_boolean.guest_mode" - } - ] - } - ] - }, - { - "type": "custom:sun-card" - }, - { - "entity": "weather.home", - "type": "weather-forecast", - "show_forecast": true, - "secondary_info_attribute": "humidity" - } - ] + ], + "background": { + "image": "/local/homekit-bg-blue-red.jpg" + } } ] } diff --git a/appdaemon/apps/apps.yaml b/appdaemon/apps/apps.yaml index ae143af..f823885 100644 --- a/appdaemon/apps/apps.yaml +++ b/appdaemon/apps/apps.yaml @@ -1,3 +1,5 @@ +# code ../addon_configs/a0d7b954_appdaemon/apps/apps.yaml + media_lights_sync: module: media_lights_sync class: MediaLightsSync @@ -40,20 +42,3 @@ media_lights_sync_spotify: - light.right_theatre - light.wood_lamp - light.metal_lamp -# -# zooz_rgbw_light: -# module: zooz_rgbw_light -# class: ZoozRGBWLight -# light_name: "Cabinets" -# unique_id: under_cabinet -# zooz_entities: -# main: light.rgbw_dimmer -# r: light.rgbw_dimmer_r -# g: light.rgbw_dimmer_g -# b: light.rgbw_dimmer_b -# w: light.rgbw_dimmer_w -# ir_ac_unit: -# module: ir_ac_unit -# class: IrAcUnit -# name: "AC Unit" -# unique_id: ac_unit diff --git a/automations.yaml b/automations.yaml index bfb2147..fbca79d 100644 --- a/automations.yaml +++ b/automations.yaml @@ -36,8 +36,8 @@ target: entity_id: - automation.bathroom_motion - - automation.closet_motion - automation.entrance_motion + - automation.closet_motion - automation.office_turn_on_desktop_while_arriving - choose: - conditions: @@ -407,17 +407,9 @@ alias: 'Office: Desktop light sync with PC ✔️' description: '' trigger: - - platform: state - entity_id: binary_sensor.eric_mbp_active - to: - platform: state entity_id: binary_sensor.gaming_pc to: - - platform: state - entity_id: binary_sensor.macbook - from: 'on' - to: 'off' - id: mbp_ping condition: - condition: template value_template: '{{ trigger.to_state.state != trigger.from_state.state }}' @@ -609,15 +601,13 @@ - climate.small_bathroom_thermostat - climate.living_room_thermostat - climate.bedroom_thermostat - - climate.office_thermostat automations: entity_id: - automation.living_room_heat_on - - automation.office_heat_sync - automation.bedroom_heats person_1: person.eric person_2: person.caro - low_temp_target: 19.5 + low_temp_target: 17 - id: '1648331331944' alias: 'Living room: Heat on ✔️' description: '' @@ -628,7 +618,7 @@ action: - service: climate.set_temperature data: - temperature: 19 + temperature: 21 target: entity_id: climate.living_room_thermostat mode: single @@ -938,13 +928,13 @@ sequence: - service: climate.set_temperature data: - temperature: 21 + temperature: 23 hvac_mode: heat target: entity_id: climate.heat_pump mode: single - id: '1670285018851' - alias: 'TV: Fireplace scene' + alias: 'TV: Fireplace scene ✔️' description: '' trigger: - platform: state @@ -957,8 +947,8 @@ seconds: 1 condition: - condition: template - value_template: '{{ "fireplace" in state_attr(''media_player.tv'', ''media_title'').lower() - }}' + value_template: '{{ state_attr(''media_player.tv'', ''media_title'') and "fireplace" + in state_attr(''media_player.tv'', ''media_title'').lower() }}' action: - service: scene.turn_on data: @@ -1068,31 +1058,31 @@ - id: '1680784352901' alias: 'Kitchen: Speaker reset when playing' description: '' - trigger: - - platform: state - entity_id: + triggers: + - entity_id: - media_player.kitchen_speaker id: speaker to: 'off' - - platform: state - entity_id: + trigger: state + - entity_id: - media_player.kitchen_speaker to: 'on' - - platform: state - entity_id: + trigger: state + - entity_id: - media_player.kitchen_speaker to: idle - - platform: state - entity_id: + trigger: state + - entity_id: - media_player.kitchen_speaker to: standby - condition: [] - action: - - service: media_player.volume_set - data: - volume_level: 0.35 + trigger: state + conditions: [] + actions: + - data: + volume_level: 0.75 target: entity_id: media_player.kitchen_speaker + action: media_player.volume_set mode: single - id: '1689213834930' alias: Guest mode ✔️ @@ -1190,3 +1180,32 @@ target: entity_id: switch.outdoor_outlet mode: single +- id: '1716503080310' + alias: 'Heat pump: turn AC off in the morning' + description: '' + trigger: + - platform: time + at: 01:00:00 + id: morning + - platform: time + at: '23:30:00' + id: night + enabled: false + condition: + - condition: not + conditions: + - condition: state + entity_id: climate.heat_pump + state: 'off' + action: + - choose: + - conditions: + - condition: trigger + id: morning + sequence: + - service: climate.turn_off + target: + entity_id: + - climate.heat_pump + data: {} + mode: single diff --git a/blueprints/automation/ericmatte/heat_away_eco_mode.yaml b/blueprints/automation/ericmatte/heat_away_eco_mode.yaml index 0bae109..3cd40b3 100644 --- a/blueprints/automation/ericmatte/heat_away_eco_mode.yaml +++ b/blueprints/automation/ericmatte/heat_away_eco_mode.yaml @@ -73,10 +73,10 @@ trigger: entity_id: !input eco_mode_boolean - platform: template id: hot_outside - value_template: '{{ state_attr(outside_temp, "temperature") > low_temp_target }}' + value_template: '{{ state_attr(outside_temp, "temperature") and state_attr(outside_temp, "temperature") > low_temp_target }}' - platform: template id: cool_outside - value_template: '{{ state_attr(outside_temp, "temperature") <= low_temp_target }}' + value_template: '{{ state_attr(outside_temp, "temperature") and state_attr(outside_temp, "temperature") <= low_temp_target }}' action: - choose: diff --git a/blueprints/template/homeassistant/inverted_binary_sensor.yaml b/blueprints/template/homeassistant/inverted_binary_sensor.yaml new file mode 100644 index 0000000..5be1840 --- /dev/null +++ b/blueprints/template/homeassistant/inverted_binary_sensor.yaml @@ -0,0 +1,27 @@ +blueprint: + name: Invert a binary sensor + description: Creates a binary_sensor which holds the inverted value of a reference binary_sensor + domain: template + source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/template/blueprints/inverted_binary_sensor.yaml + input: + reference_entity: + name: Binary sensor to be inverted + description: The binary_sensor which needs to have its value inverted + selector: + entity: + domain: binary_sensor +variables: + reference_entity: !input reference_entity +binary_sensor: + state: > + {% if states(reference_entity) == 'on' %} + off + {% elif states(reference_entity) == 'off' %} + on + {% else %} + {{ states(reference_entity) }} + {% endif %} + # delay_on: not_used in this example + # delay_off: not_used in this example + # auto_off: not_used in this example + availability: "{{ states(reference_entity) not in ('unknown', 'unavailable') }}" diff --git a/configuration.yaml b/configuration.yaml index e5d2cb1..8e4a378 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -56,19 +56,6 @@ device_tracker: hosts: eric_ping: 192.168.0.100 caro_ping: 192.168.0.101 - # As of 2023.8, it is now unsupported: Requirements for bluetooth_tracker not found: ['PyBluez==0.22']. - # - platform: bluetooth_tracker - # interval_seconds: 8 - # consider_home: 300 - # new_device_defaults: - # track_new_devices: false - -notify: - - name: html5 - platform: html5 - vapid_pub_key: !secret vapid_public_key - vapid_prv_key: !secret vapid_private_key - vapid_email: !secret vapid_email # zwave: # usb_path: /dev/ttyACM1 # /dev/ttyACM0 @@ -100,32 +87,11 @@ template: state: > {{ state_attr('climate.heat_pump', 'current_humidity') | round }} -binary_sensor: - - platform: ping - name: Macbook - host: 192.168.0.102 - count: 2 - scan_interval: 45 - - platform: ping - name: Gaming PC - host: 192.168.0.103 - count: 2 - scan_interval: 30 - sensor: - platform: time_date display_options: - "time" - "date" - - platform: systemmonitor - resources: - - type: memory_free - - type: processor_use - - type: last_boot - - type: disk_use_percent - arg: /home - - type: disk_free - arg: / command_line: - sensor: diff --git a/www/custom-lovelace/floorplan.js b/www/custom-lovelace/floorplan.js index 0ed8961..53e7b1d 100644 --- a/www/custom-lovelace/floorplan.js +++ b/www/custom-lovelace/floorplan.js @@ -194,10 +194,12 @@ const checkPageTransition = () => { }, true); }; -document.body.addEventListener("click", checkPageTransition); -document.body.addEventListener("keyup", (e) => { - if (e.code === "Enter" || e.code === "Space") checkPageTransition(); -}); +const setupListeners = () => { + document.body.addEventListener("click", checkPageTransition); + document.body.addEventListener("keyup", (e) => { + if (e.code === "Enter" || e.code === "Space") checkPageTransition(); + }); -window.addEventListener("resize", () => selectRotation()); -selectRotation(); + window.addEventListener("resize", () => selectRotation()); + selectRotation(); +}; diff --git a/www/homekit-bg-blue-red.jpg b/www/homekit-bg-blue-red.jpg new file mode 100644 index 0000000..9a82c41 Binary files /dev/null and b/www/homekit-bg-blue-red.jpg differ