Skip to content

Commit 3c52b07

Browse files
committed
apps/homeassistant: fix displaying last line on LCD display
Signed-off-by: Paweł Krupa (paulfantom) <[email protected]>
1 parent 924ea11 commit 3c52b07

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

apps/homeassistant/config/configuration.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ template:
194194
%}
195195
{% if calendars|length > 1 %}
196196
{{ calendars[1].prefix }} {{ calendars[1].data }}
197+
{% else %}
198+
197199
{% endif %}
198200
line4: >
199201
{%
@@ -215,8 +217,10 @@ template:
215217
"data": state_attr('calendar.adrianna_wojas_gmail_com','message') | regex_replace(find='[^\x00-\x7F]+', replace='', ignorecase=False) | trim
216218
}] | rejectattr("timestamp", "gt", as_timestamp(utcnow()) | int + 24*60*60) | sort(attribute='timestamp')
217219
%}
218-
{% if calendars|length >= 2 %}
219-
{{ calendars[2].prefix }} {{ calendars[2].data }}
220+
{% if calendars|length > 1 %}
221+
{{ calendars[1].prefix }} {{ calendars[1].data }}
222+
{% else %}
223+
220224
{% endif %}
221225
222226
input_boolean:

apps/homeassistant/manifests/homeassistant/configs.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ data:
7979
\ }] | rejectattr(\"timestamp\", \"gt\", as_timestamp(utcnow()) | int
8080
+ 24*60*60) | sort(attribute='timestamp') \n %}\n {% if calendars|length
8181
> 1 %}\n {{ calendars[1].prefix }} {{ calendars[1].data }}\n {%
82-
endif %}\n line4: >\n {%\n set calendars = [{\n \"timestamp\":
83-
as_timestamp(state_attr('calendar.pawel_krupa_net_pl','start_time')) | int,\n
84-
\ \"prefix\": as_timestamp(state_attr('calendar.pawel_krupa_net_pl','start_time'))
82+
else %}\n \n {% endif %}\n line4: >\n {%\n set
83+
calendars = [{\n \"timestamp\": as_timestamp(state_attr('calendar.pawel_krupa_net_pl','start_time'))
84+
| int,\n \"prefix\": as_timestamp(state_attr('calendar.pawel_krupa_net_pl','start_time'))
8585
| int | timestamp_custom(\"%H:%M\"),\n \"data\": state_attr('calendar.pawel_krupa_net_pl','message')
8686
| regex_replace(find='[^\\x00-\\x7F]+', replace='', ignorecase=False) | trim\n
8787
\ },{\n \"timestamp\": as_timestamp(state_attr('calendar.pawel_timescale_com','start_time'))
@@ -98,14 +98,14 @@ data:
9898
| regex_replace(find='[^\\x00-\\x7F]+', replace='', ignorecase=False) | trim\n
9999
\ }] | rejectattr(\"timestamp\", \"gt\", as_timestamp(utcnow()) | int
100100
+ 24*60*60) | sort(attribute='timestamp') \n %}\n {% if calendars|length
101-
>= 2 %}\n {{ calendars[2].prefix }} {{ calendars[2].data }}\n {%
102-
endif %}\n\ninput_boolean:\n projector:\n name: Projector State\n icon:
103-
mdi:projector\n projector_screen:\n name: Projector Screen State\n icon:
104-
mdi:projector-screen-variant-outline\n\ninput_select:\n speakers:\n name:
105-
Speakers Input\n icon: mdi:speakers\n options:\n - opt/coax\n - line1/2\n
106-
\ - bt\n initial: line1/2\n\nplant:\n jovita:\n sensors:\n moisture:
107-
sensor.jovita_moisture\n temperature: sensor.jovita_temperature\n conductivity:
108-
sensor.jovita_soil_conductivity\n brightness: sensor.jovita_illuminance\n
101+
> 1 %}\n {{ calendars[1].prefix }} {{ calendars[1].data }}\n {%
102+
else %}\n \n {% endif %}\n\ninput_boolean:\n projector:\n name:
103+
Projector State\n icon: mdi:projector\n projector_screen:\n name: Projector
104+
Screen State\n icon: mdi:projector-screen-variant-outline\n\ninput_select:\n
105+
\ speakers:\n name: Speakers Input\n icon: mdi:speakers\n options:\n
106+
\ - opt/coax\n - line1/2\n - bt\n initial: line1/2\n\nplant:\n jovita:\n
107+
\ sensors:\n moisture: sensor.jovita_moisture\n temperature: sensor.jovita_temperature\n
108+
\ conductivity: sensor.jovita_soil_conductivity\n brightness: sensor.jovita_illuminance\n
109109
\ min_moisture: 15\n max_moisture: 60\n min_conductivity: 350\n max_conductivity:
110110
2000\n min_temperature: 10\n max_temperature: 32\n min_brightness: 500\n
111111
\ max_brightness: 12000\n svetlana:\n sensors:\n moisture: sensor.svetlana_moisture\n

apps/homeassistant/manifests/homeassistant/statefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
template:
2020
metadata:
2121
annotations:
22-
checksum.config/md5: 0aafca0e2ba1e5a103cb79aecee6d265
22+
checksum.config/md5: 57cbd94842b2ba0d785579fcea10c28c
2323
labels:
2424
app.kubernetes.io/component: server
2525
app.kubernetes.io/name: homeassistant

0 commit comments

Comments
 (0)