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 - platform: homeassistant
id: datetime id: datetime
number: # number:
# Creates a number entity in Home Assistant # # Creates a number entity in Home Assistant
# It sets the menu of the Button Plus # # It sets the menu of the Button Plus
- platform: template # - platform: template
name: "Menu Selector" # name: "Menu Selector"
id: menu_selector # id: menu_selector
optimistic: true # optimistic: true
min_value: 0 # keep at 0 # min_value: 0 # keep at 0
max_value: ${nr_of_pages} # max_value: ${nr_of_pages}
step: 1 # step: 1
on_value: # on_value:
then: # then:
- lambda: |- # - lambda: |-
if(id(menu_selector).state >= $nr_of_pages) { # if(id(menu_selector).state >= $nr_of_pages) {
id(actual_page) = $nr_of_pages-1; # id(actual_page) = $nr_of_pages-1;
} else { # } else {
id(actual_page) = id(menu_selector).state; # id(actual_page) = id(menu_selector).state;
} # }
# Refresh the screen # # Refresh the screen
- script.execute: update_all # @balk77 update_page results in a loop, moved update_all to here, now test # - script.execute: update_all # @balk77 update_page results in a loop, moved update_all to here, now test
script: script:
###################### ######################