This commit is contained in:
Martijn
2024-12-27 20:10:57 +01:00
parent 5efc0b7671
commit f0a99c50fd
+20 -20
View File
@@ -95,26 +95,26 @@ time:
- platform: homeassistant
id: datetime
number:
# Creates a number entity in Home Assistant
# It sets the menu of the Button Plus
- platform: template
name: "Menu Selector"
id: menu_selector
optimistic: true
min_value: 0 # keep at 0
max_value: ${nr_of_pages}
step: 1
on_value:
then:
- lambda: |-
if(id(menu_selector).state >= $nr_of_pages) {
id(actual_page) = $nr_of_pages-1;
} else {
id(actual_page) = id(menu_selector).state;
}
# Refresh the screen
- script.execute: update_all # @balk77 update_page results in a loop, moved update_all to here, now test
# number:
# # Creates a number entity in Home Assistant
# # It sets the menu of the Button Plus
# - platform: template
# name: "Menu Selector"
# id: menu_selector
# optimistic: true
# min_value: 0 # keep at 0
# max_value: ${nr_of_pages}
# step: 1
# on_value:
# then:
# - lambda: |-
# if(id(menu_selector).state >= $nr_of_pages) {
# id(actual_page) = $nr_of_pages-1;
# } else {
# id(actual_page) = id(menu_selector).state;
# }
# # Refresh the screen
# - script.execute: update_all # @balk77 update_page results in a loop, moved update_all to here, now test
script:
######################