Add validation actions (#693)

* Add validation action

* Clean-up yaml

Removed trailing spaces

* Clean-up yaml

Removed trailing spaces

* Clean-up yaml

Removed trailing spaces

* Clean-up yaml

Removed trailing spaces

* Clean-up yaml

Removed trailing spaces

* Update validate_yaml.yml

* Validate on push

Only for nspanel_esphome.yaml and nspanel_blueprint.yaml

* Extending warnings for +255-char lines

* Update validate_yaml.yml

* Clean-up yaml

* Update validate_yaml.yml

* Clean-up yaml

* Clean-up yaml

* Clean-up yaml

* Clean-up yaml

* Clean-up yaml

* Update and rename validate_yaml.yml to validate_blueprint.yml

* Create validate_esphome.yml

* Clean-up yaml
This commit is contained in:
Edward Firmo
2023-04-19 13:16:28 +02:00
committed by GitHub
parent cf5829af8f
commit 60c43e99bd
8 changed files with 184 additions and 139 deletions

View File

@@ -186,7 +186,7 @@ api:
message: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());'
##### Service to send a command "component_value (Dualstate Button)" directly to the display #####
@@ -196,7 +196,7 @@ api:
message: int
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).set_component_value(component.c_str(), message);'
##### Service to send a command "hide componente" directly to the display #####
@@ -205,7 +205,7 @@ api:
component: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).hide_component(component.c_str());'
##### Service to send a command "show componente" directly to the display #####
@@ -214,14 +214,14 @@ api:
component: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).show_component(component.c_str());'
##### Service to send a command "show ALL componente" directly to the display #####
- service: send_command_show_all ### unused ###
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).show_component("255");'
##### Service to send a command "font color" directly to the display #####
@@ -231,7 +231,7 @@ api:
message: int
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
##### Service to send a command "background color" directly to the display #####
@@ -241,7 +241,7 @@ api:
message: int
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: 'id(disp1).set_component_background_color(component.c_str(), message);'
##### Service to show a notification-message on the screen #####
@@ -251,7 +251,7 @@ api:
text: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
id(disp1).send_command_printf("page notification");
id(disp1).set_component_text_printf("notification.notifi_label", "%s", label.c_str());
@@ -269,7 +269,7 @@ api:
- service: notification_clear
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
id(notification_label).publish_state("");
id(notification_text).publish_state("");
@@ -300,7 +300,7 @@ api:
qrdata: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
id(disp1).send_command_printf("page qrcode");
id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrdata.c_str());
@@ -311,7 +311,7 @@ api:
value: float
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
//ESP_LOGD("nextion", "thermostat sendig value %f", value);
int v = int(2 * std::min(std::max(value - 13.5, 0.0), 5.0));
@@ -345,7 +345,7 @@ api:
btn_bri_txt: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
// ESP_LOGD("nextion", "set button %s", btn_id.c_str());
std::string btnicon = btn_id.c_str() + std::string("icon");
@@ -375,7 +375,7 @@ api:
ent_value: string
then:
- wait_until:
switch.is_on: nextion_init
switch.is_on: nextion_init
- lambda: |-
// ESP_LOGD("nextion", "set entity %s", ent_id.c_str());
std::string enticon = ent_id.c_str() + std::string("_pic");
@@ -429,12 +429,12 @@ binary_sensor:
- if:
condition:
and:
- switch.is_on: relay1_fallback
- not:
api.connected:
- switch.is_on: relay1_fallback
- not:
api.connected:
then:
- switch.toggle: relay_1
- if:
- if:
condition:
switch.is_on: relay_1
then:
@@ -457,12 +457,12 @@ binary_sensor:
- if:
condition:
and:
- switch.is_on: relay2_fallback
- not:
api.connected:
- switch.is_on: relay2_fallback
- not:
api.connected:
then:
- switch.toggle: relay_2
- if:
- if:
condition:
switch.is_on: relay_2
then:
@@ -744,15 +744,15 @@ switch:
on_turn_off:
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=0");
- globals.set:
id: sleep_modus_global
value: '0'
- lambda: id(disp1).set_component_value("settings.bt1",0);
id: sleep_modus_global
value: '0'
- lambda: id(disp1).set_component_value("settings.bt1",0);
on_turn_on:
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
- globals.set:
id: sleep_modus_global
value: '1'
- lambda: id(disp1).set_component_value("settings.bt1",1);
id: sleep_modus_global
value: '1'
- lambda: id(disp1).set_component_value("settings.bt1",1);
##### Relay Local control Fallback #####
- platform: template