File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -681,7 +681,9 @@ struct HA {
681681 public: void discovery () {
682682 String dev_switch= " " ;
683683
684- if (dev_cla ==" switch" ) {
684+ if (stat_cla == nullptr ) { // rien faire
685+ }
686+ else if (dev_cla ==" switch" ) {
685687 dev_switch = R"(
686688 "pl_on": "{ \")" + name + R"( \" : \"1\" }",
687689 "pl_off": "{ \")" + name + R"( \" : \"0\" }",
@@ -694,6 +696,7 @@ struct HA {
694696 "unit_of_meas": ")" + unit_of_meas + R"( ",
695697 "stat_cla": ")" + stat_cla + R"( ",
696698 )" ;
699+
697700 }
698701
699702 IPaddress = WiFi.localIP () ;
Original file line number Diff line number Diff line change 9999
100100 // création des binary_sensor
101101 device_dimmer_alarm_temp .Set_name ("Surchauffe" );
102- device_dimmer_alarm_temp .Set_dev_cla ("problem" );
103-
102+ device_dimmer_alarm_temp .Set_dev_cla ("enum" );
103+ device_dimmer_alarm_temp .Set_icon ("mdi:alert" );
104+
104105 switch_relay1 .Set_name ("Relay1" );
105106 switch_relay1 .Set_dev_cla ("switch" );
106107
You can’t perform that action at this time.
0 commit comments