@@ -660,24 +660,49 @@ action:
660
660
| first
661
661
}}
662
662
{% endif %}
663
- pending_updates_list : |
663
+ combined_list : |
664
+ {{
665
+ (
666
+ firmware_update_entities | default([]) | list
667
+ if firmware_update_entities is sequence
668
+ else [firmware_update_entities | string] if firmware_update_entities is not none else []
669
+ ) +
670
+ (
671
+ general_update_entities | default([]) | list
672
+ if general_update_entities is sequence
673
+ else [general_update_entities | string] if general_update_entities is not none else []
674
+ ) +
675
+ (
676
+ core_update_entity | default([]) | list
677
+ if core_update_entity is sequence
678
+ else [core_update_entity | string] if core_update_entity is not none else []
679
+ ) +
680
+ (
681
+ os_update_entity | default([]) | list
682
+ if os_update_entity is sequence
683
+ else [os_update_entity | string] if os_update_entity is not none else []
684
+ ) +
685
+ (
686
+ supervisor_update_entity | default([]) | list
687
+ if supervisor_update_entity is sequence
688
+ else [supervisor_update_entity | string] if supervisor_update_entity is not none else []
689
+ )
690
+ }}
691
+ pending_update_list : |
664
692
{{
665
693
states.update
666
694
| default([])
667
695
| selectattr("state", "eq", "on")
668
- | selectattr('entity_id', 'in', [ firmware_update_entities,
669
- general_update_entities,
670
- core_update_entity,
671
- os_update_entity,
672
- supervisor_update_entity])
696
+ | selectattr('entity_id', 'in', combined_list)
673
697
| rejectattr('entity_id', 'in', input_update_exclusions)
674
698
| map(attribute='entity_id')
675
699
| list
676
700
}}
677
- pending_update_count : ' {{ pending_updates_list | list | count | int(0) }}'
701
+ pending_update_count : ' {{ pending_update_list | list | count | int(0) }}'
678
702
679
703
- variables :
680
- updates_list : ' {{ pending_updates_list }}'
704
+ update_list : ' {{ pending_update_list }}'
705
+ updates_list : ' {{ pending_update_list }}'
681
706
is_there_anything_to_update : ' {{ pending_update_count > 0 }}'
682
707
683
708
- alias : Preparation # Inform logbook and telegram which update automation is running
@@ -857,7 +882,7 @@ action:
857
882
value_template : >
858
883
{{ ( states.update
859
884
| selectattr('state', 'eq', 'on')
860
- | selectattr('entity_id', 'in', pending_updates_list )
885
+ | selectattr('entity_id', 'in', pending_update_list )
861
886
| rejectattr('entity_id', 'in', core_update_entity)
862
887
| rejectattr('entity_id', 'in', os_update_entity)
863
888
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -873,7 +898,7 @@ action:
873
898
pending_update_list : >
874
899
{{ states.update
875
900
| selectattr('state', 'eq', 'on')
876
- | selectattr('entity_id', 'in', pending_updates_list )
901
+ | selectattr('entity_id', 'in', pending_update_list )
877
902
| rejectattr('entity_id', 'in', core_update_entity)
878
903
| rejectattr('entity_id', 'in', os_update_entity)
879
904
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -920,7 +945,7 @@ action:
920
945
value_template : >
921
946
{{ ( states.update
922
947
| selectattr('state', 'eq', 'on')
923
- | selectattr('entity_id', 'in', pending_updates_list )
948
+ | selectattr('entity_id', 'in', pending_update_list )
924
949
| rejectattr('entity_id', 'in', core_update_entity)
925
950
| rejectattr('entity_id', 'in', os_update_entity)
926
951
| selectattr('entity_id', 'in', firmware_update_entities)
@@ -938,7 +963,7 @@ action:
938
963
pending_update_list : >
939
964
{{ states.update
940
965
| selectattr('state', 'eq', 'on')
941
- | selectattr('entity_id', 'in', pending_updates_list )
966
+ | selectattr('entity_id', 'in', pending_update_list )
942
967
| rejectattr('entity_id', 'in', core_update_entity)
943
968
| rejectattr('entity_id', 'in', os_update_entity)
944
969
| selectattr('entity_id', 'in', firmware_update_entities)
@@ -971,7 +996,7 @@ action:
971
996
value_template : >
972
997
{{ ( states.update
973
998
| selectattr('state', 'eq', 'on')
974
- | selectattr('entity_id', 'in', pending_updates_list )
999
+ | selectattr('entity_id', 'in', pending_update_list )
975
1000
| selectattr('entity_id', 'in', core_update_entity)
976
1001
| rejectattr('entity_id', 'in', os_update_entity)
977
1002
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -989,7 +1014,7 @@ action:
989
1014
pending_update_list : >
990
1015
{{ states.update
991
1016
| selectattr('state', 'eq', 'on')
992
- | selectattr('entity_id', 'in', pending_updates_list )
1017
+ | selectattr('entity_id', 'in', pending_update_list )
993
1018
| selectattr('entity_id', 'in', core_update_entity)
994
1019
| rejectattr('entity_id', 'in', os_update_entity)
995
1020
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -1023,7 +1048,7 @@ action:
1023
1048
value_template : >
1024
1049
{{ ( states.update
1025
1050
| selectattr('state', 'eq', 'on')
1026
- | selectattr('entity_id', 'in', pending_updates_list )
1051
+ | selectattr('entity_id', 'in', pending_update_list )
1027
1052
| rejectattr('entity_id', 'in', core_update_entity)
1028
1053
| selectattr('entity_id', 'in', os_update_entity)
1029
1054
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -1041,7 +1066,7 @@ action:
1041
1066
pending_update_list : >
1042
1067
{{ states.update
1043
1068
| selectattr('state', 'eq', 'on')
1044
- | selectattr('entity_id', 'in', pending_updates_list )
1069
+ | selectattr('entity_id', 'in', pending_update_list )
1045
1070
| rejectattr('entity_id', 'in', core_update_entity)
1046
1071
| selectattr('entity_id', 'in', os_update_entity)
1047
1072
| rejectattr('entity_id', 'in', firmware_update_entities)
@@ -1078,7 +1103,7 @@ action:
1078
1103
entity_id : >-
1079
1104
{{ states.update
1080
1105
| selectattr('state', 'eq', 'on')
1081
- | selectattr('entity_id', 'in', pending_updates_list )
1106
+ | selectattr('entity_id', 'in', pending_update_list )
1082
1107
| rejectattr('entity_id', 'in', input_update_exclusions)
1083
1108
| map(attribute='entity_id')
1084
1109
| list
@@ -1090,7 +1115,7 @@ action:
1090
1115
(
1091
1116
states.update
1092
1117
| selectattr('state', 'eq', 'on')
1093
- | selectattr('entity_id', 'in', pending_updates_list )
1118
+ | selectattr('entity_id', 'in', pending_update_list )
1094
1119
| rejectattr('entity_id', 'in', input_update_exclusions)
1095
1120
| list
1096
1121
| count
@@ -1113,14 +1138,14 @@ action:
1113
1138
Remaining updates:
1114
1139
{{ '- ' + states.update
1115
1140
| selectattr('state', 'eq', 'on')
1116
- | selectattr('entity_id', 'in', pending_updates_list )
1141
+ | selectattr('entity_id', 'in', pending_update_list )
1117
1142
| rejectattr('entity_id', 'in', input_update_exclusions)
1118
1143
| map(attribute='name') | list | join('
1119
1144
1120
1145
- ') if
1121
1146
states.update
1122
1147
| selectattr('state', 'eq', 'on')
1123
- | selectattr('entity_id', 'in', pending_updates_list )
1148
+ | selectattr('entity_id', 'in', pending_update_list )
1124
1149
| rejectattr('entity_id', 'in', input_update_exclusions)
1125
1150
| map(attribute='name') | list | count | int(0) > 0
1126
1151
else 'None remaining'
0 commit comments