Add keyb_num page

This commit is contained in:
Edward Firmo
2023-08-16 13:19:41 +02:00
parent 6964af008b
commit cb0e2aaa4b
13 changed files with 1105 additions and 29 deletions

View File

@@ -539,6 +539,8 @@ api:
else
id(disp1).set_component_text_printf("icon_state", "%s", page_icon.c_str());
id(disp1).set_component_text_printf("page_label", "%s", page_title.c_str());
id(disp1).set_component_text_printf("code_format", "%s", code_format.c_str());
- lambda: |- # Alarm page - Button's icons
id(disp1).set_component_text_printf("bt_home_icon", "\uE689"); //mdi:shield-home
id(disp1).set_component_text_printf("bt_away_icon", "\uE99C"); //mdi:shield-lock
@@ -547,15 +549,6 @@ api:
id(disp1).set_component_text_printf("bt_bypass_icon", "\uF19F"); //mdi:shield-edit
id(disp1).set_component_text_printf("bt_disarm_icon", "\uE99D"); //mdi:shield-off
# Supported features
# ARM_HOME = 1
# ARM_AWAY = 2
# ARM_NIGHT = 4
# TRIGGER = 8
# ARM_CUSTOM_BYPASS = 16
# ARM_VACATION = 32
- lambda: |- # Alarm - Buttons
if (supported_features & 1) // Alarm - Button - Home
{
@@ -945,13 +938,20 @@ text_sensor:
id(disp1).set_component_text_printf("climate.button07_icon", "%s", "\uE424"); //mdi:power
id(addon_climate_update_page_climate);
}
else if (page=="fan")
else if (page=="fan")
{
id(disp1).set_component_text_printf("fan.button_on", "%s", "\uE20F"); //mdi:fan
id(disp1).set_component_text_printf("fan.button_off", "%s", "\uE81C"); //mdi:fan-off
id(disp1).set_component_text_printf("fan.button_up", "%s", "\uF46D"); //mdi:fan-chevron-up
id(disp1).set_component_text_printf("fan.button_down", "%s", "\uF46C"); //mdi:fan-chevron-down
}
else if (page=="keyb_num")
{
id(disp1).set_component_text_printf("keyb_num.bview", "%s", "\uE207"); //mdi:eye
id(disp1).set_component_text_printf("keyb_num.bclose", "%s", "\uE158"); //mdi:close-circle
id(disp1).set_component_text_printf("keyb_num.bclear", "%s", "\uE641"); //mdi:eraser-variant
id(disp1).set_component_text_printf("keyb_num.benter", "%s", "\uE12B"); //mdi:check
}
}
else if (page=="boot" and component=="timeout" and stof(value) >= 5) id(disp1).send_command_printf("page %i", id(wakeup_page_id));
@@ -988,7 +988,11 @@ text_sensor:
ESP_LOGD("text_sensor.localevent", "embedded=%i", embedded);
}
if (domain == "climate") id(service_call_climate)->execute(entity.c_str(), key.c_str(), value.c_str(), (embedded==1));
else if (domain == "alarm_control_panel") id(service_call_alarm_control_panel)->execute(entity.c_str(), value.c_str());
else if (domain == "alarm_control_panel")
{
std::string code_format = doc["code_format"];
id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), value.c_str()); // DEBUG - Need to open the pin code page first, code_format.c_str());
}
else if (domain == "light") id(ha_call_service)->execute("light.turn_on", key.c_str(), value.c_str(), entity.c_str());
else if (domain == "cover")
{
@@ -1491,6 +1495,7 @@ script:
mode: restart
parameters:
entity: string
key: string
pin: string
then:
- lambda: |-