Rename 'Sleep mode' switch (#714)
* Rename 'Sleep mode' switch Renamed from `Sleep Modus` to `Sleep mode`. Breaking change: This will rename the entity_id of that switch and this can affect existing automations created by users and also will require changes in the blueprint if #698 is merged. Note: Variable names in HMI/TFT not renamed. * Align with other PR
This commit is contained in:
@@ -3347,7 +3347,7 @@ trigger_variables:
|
|||||||
nspaneltemp: 'sensor.{{ nspanel_name }}_temperature'
|
nspaneltemp: 'sensor.{{ nspanel_name }}_temperature'
|
||||||
settings_entity: 'sensor.{{ nspanel_name }}_settings_entity'
|
settings_entity: 'sensor.{{ nspanel_name }}_settings_entity'
|
||||||
reboot_button: 'button.{{ nspanel_name }}_restart'
|
reboot_button: 'button.{{ nspanel_name }}_restart'
|
||||||
switch_sleep_mode: 'switch.{{ nspanel_name }}_sleep_modus'
|
switch_sleep_mode: 'switch.{{ nspanel_name }}_sleep_mode'
|
||||||
|
|
||||||
##### notification Trigger #####
|
##### notification Trigger #####
|
||||||
notification_unread: 'switch.{{ nspanel_name }}_notification_unread'
|
notification_unread: 'switch.{{ nspanel_name }}_notification_unread'
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ globals:
|
|||||||
initial_value: '0.0'
|
initial_value: '0.0'
|
||||||
|
|
||||||
##### Save Display DIM Brightness for NSPanel reboot
|
##### Save Display DIM Brightness for NSPanel reboot
|
||||||
- id: sleep_modus_global
|
- id: sleep_mode_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
@@ -502,14 +502,14 @@ binary_sensor:
|
|||||||
on_click:
|
on_click:
|
||||||
- button.press: restart_nspanel
|
- button.press: restart_nspanel
|
||||||
|
|
||||||
##### Sleep Modus NSPanel Button #####
|
##### Sleep mode NSPanel Button #####
|
||||||
- name: ${device_name} Sleep Modus
|
- name: ${device_name} Sleep mode
|
||||||
platform: nextion
|
platform: nextion
|
||||||
page_id: 7
|
page_id: 7
|
||||||
component_id: 14
|
component_id: 14
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- switch.toggle: sleep_modus
|
- switch.toggle: sleep_mode
|
||||||
|
|
||||||
##### START - SENSOR CONFIGURATION #####
|
##### START - SENSOR CONFIGURATION #####
|
||||||
sensor:
|
sensor:
|
||||||
@@ -730,11 +730,11 @@ switch:
|
|||||||
restore_mode: ALWAYS_ON
|
restore_mode: ALWAYS_ON
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
##### Switch Display Sleep Modus #####
|
##### Switch Display Sleep mode #####
|
||||||
- name: ${device_name} Sleep Modus
|
- name: ${device_name} Sleep mode
|
||||||
platform: template
|
platform: template
|
||||||
device_class: switch
|
device_class: switch
|
||||||
id: sleep_modus
|
id: sleep_mode
|
||||||
entity_category: config
|
entity_category: config
|
||||||
restore_state: true
|
restore_state: true
|
||||||
assumed_state: false
|
assumed_state: false
|
||||||
@@ -742,13 +742,13 @@ switch:
|
|||||||
on_turn_off:
|
on_turn_off:
|
||||||
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=0");
|
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=0");
|
||||||
- globals.set:
|
- globals.set:
|
||||||
id: sleep_modus_global
|
id: sleep_mode_global
|
||||||
value: '0'
|
value: '0'
|
||||||
- lambda: id(disp1).set_component_value("settings.bt1",0);
|
- lambda: id(disp1).set_component_value("settings.bt1",0);
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
|
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
|
||||||
- globals.set:
|
- globals.set:
|
||||||
id: sleep_modus_global
|
id: sleep_mode_global
|
||||||
value: '1'
|
value: '1'
|
||||||
- lambda: id(disp1).set_component_value("settings.bt1",1);
|
- lambda: id(disp1).set_component_value("settings.bt1",1);
|
||||||
|
|
||||||
@@ -860,8 +860,8 @@ display:
|
|||||||
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||||
- lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
- lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
||||||
- lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
- lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
||||||
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global));
|
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_mode_global));
|
||||||
- lambda: id(disp1).set_component_value("settings.a02", id(sleep_modus_global) == 1);
|
- lambda: id(disp1).set_component_value("settings.a02", id(sleep_mode_global) == 1);
|
||||||
- delay: 1s
|
- delay: 1s
|
||||||
- switch.template.publish:
|
- switch.template.publish:
|
||||||
id: nextion_init
|
id: nextion_init
|
||||||
|
|||||||
Reference in New Issue
Block a user