Use set_gang_count
This commit is contained in:
@@ -160,6 +160,9 @@ select:
|
|||||||
entity_category: config
|
entity_category: config
|
||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
icon: mdi:dip-switch
|
icon: mdi:dip-switch
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- lambda: set_gang_count(static_cast<uint8_t>(i)+1);
|
||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
- id: tx_fw_version
|
- id: tx_fw_version
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ script:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
const uint8_t num_gangs = (sl_tx_model_gang->active_index().has_value()) ?
|
const uint8_t num_gangs = (sl_tx_model_gang->active_index().has_value()) ?
|
||||||
(sl_tx_model_gang->active_index().value() + 1) : 0;
|
(sl_tx_model_gang->active_index().value() + 1) : 0;
|
||||||
|
set_gang_count(num_gangs);
|
||||||
bs_button_1_click_event->publish_state(false);
|
bs_button_1_click_event->publish_state(false);
|
||||||
bs_button_2_click_event->publish_state(false);
|
bs_button_2_click_event->publish_state(false);
|
||||||
bs_button_3_click_event->publish_state(false);
|
bs_button_3_click_event->publish_state(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user