Skip to content

Commit

Permalink
ecobee, template, logging, automations, hass.agent
Browse files Browse the repository at this point in the history
- Changes for ecobee
- Fix possible error in nominal_change_history
- Add entities to recorder, logbook, and influx config
- Fix message in "Print Completed"
- Update UI for Hass.Agent changes
  • Loading branch information
zanix committed May 3, 2024
1 parent cf732be commit 8b46371
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 85 deletions.
4 changes: 2 additions & 2 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5178,8 +5178,8 @@
- variables:
time: '{{ as_timestamp(now()) | timestamp_custom("%-m/%-d/%Y %-I:%M %p") }}'
model: '{{ states("sensor.bambu_p1s_task_name") | replace(".3mf","") | replace(".gcode","")
}} {{ trigger.id | lower }}'
message: '{{ model }} {{ trigger.id | lower }} printing {{ time }}'
}}'
message: '{{ model }} {{ trigger.id | lower }} printing at {{ time }}'
- parallel:
- service: script.notify_mobile
data:
Expand Down
8 changes: 6 additions & 2 deletions custom_templates/util.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@
Return last changed using change history sensor.
#}
{%- macro nominal_change_history(entity) -%}
{%- set last_changed = state_attr("sensor.nominal_change_history", "changes")[entity] | as_datetime -%}
{{ custom_timedelta(last_changed) }}
{%- set last_changed = state_attr("sensor.nominal_change_history", "changes") -%}
{%- if entity in last_changed -%}
{{ custom_timedelta(last_changed) | as_datetime }}
{%- endif -%}
{%- endmacro -%}

{#
Expand All @@ -191,6 +193,7 @@

{#
Returns color based on humidity.
Used in MagicMirror.
#}
{%- macro room_humidity(entity) -%}
{%- set color = "#4599dd" -%}
Expand All @@ -211,6 +214,7 @@

{#
Returns color based on room temperature.
Used in MagicMirror.
#}
{%- macro room_temp(entity) -%}
{%- set color = "#bdbdbd" -%}
Expand Down
18 changes: 0 additions & 18 deletions entities/template/select/ecobee_preset.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions entities/template/sensor/change_history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
trigger:
- platform: state
entity_id:
- binary_sensor.doorbell_camera_motion
- binary_sensor.doorbell_ring
- binary_sensor.front_door_contact_door_is_open
- binary_sensor.garage_entry_door_contact_door_is_open
- binary_sensor.garage_side_door_contact_door_is_open
- binary_sensor.sliding_door_contact
- cover.opengarage
- input_boolean.dryer_status
- input_boolean.washer_status
- binary_sensor.doorbell_ring
- binary_sensor.doorbell_camera_motion
- sensor.doorbell_person_count
not_to:
- unavailable
Expand Down
2 changes: 1 addition & 1 deletion entities/template/sensor/ecobee_mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ sensor:
%}
Fan
{% else %}
{{ state_attr("climate.ecobee", "hvac_action") | capitalize }}
{{ state_attr("climate.ecobee", "hvac_action") | title }}
{% endif %}
12 changes: 12 additions & 0 deletions entities/template/sensor/ecobee_preset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# The template platform supports sensors which get their values from other
# entities.
#
# https://www.home-assistant.io/integrations/ecobee/
# https://www.home-assistant.io/integrations/climate/
# https://www.home-assistant.io/integrations/template/
#
sensor:
- name: Ecobee Preset
availability: '{{ has_value("climate.ecobee_cloud") }}'
state: '{{ state_attr("climate.ecobee_cloud", "preset_mode") | replace("_", " ") | title }}'
6 changes: 4 additions & 2 deletions packages/influxdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ influxdb:
# exclude: !include_dir_merge_named ../entities/influxdb
exclude:
entity_globs:
- sensor.sol_ark*_kwh
- sensor.*_last_seen
- sensor.date*
- sensor.sol_ark*_kwh
- sensor.time*

entities:
- sensor.home_assistant_core_uptime
- sensor.last_boot
- sensor.sunset
- sensor.stardate
- sensor.sunrise
- sensor.sunset
10 changes: 6 additions & 4 deletions packages/logbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ logbook:
domains:
- camera
entity_globs:
- sensor.sol_ark*_kwh
- sensor.*_last_seen
- sensor.date*
- sensor.sol_ark*_kwh
- sensor.time*
entities:
- image.bambu_p1s_camera
- sensor.home_assistant_core_uptime
- sensor.uptime
- sensor.last_boot
- sensor.sol_ark_battery_time_remaining
- sensor.stardate
- sensor.sunset
- sensor.sunrise
- image.bambu_p1s_camera
- sensor.sunset
- sensor.uptime
9 changes: 5 additions & 4 deletions packages/recorder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ recorder:
domains:
- camera
entity_globs:
- sensor.sol_ark*_kwh
- sensor.*_last_seen
- sensor.date*
- sensor.sol_ark*_kwh
- sensor.time*
entities:
- image.bambu_p1s_camera
- sensor.home_assistant_core_uptime
- sensor.uptime
- sensor.last_boot
- sensor.stardate
- sensor.sunset
- sensor.sunrise
- image.bambu_p1s_camera
- sensor.sunset
- sensor.uptime
Loading

0 comments on commit 8b46371

Please sign in to comment.