mirror of https://github.com/arendst/Tasmota.git
Fix switches
This commit is contained in:
parent
7915e82cb0
commit
8376dd8982
|
@ -16,7 +16,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Zigbee command ``ZbOccupancy`` to configure the time-out for PIR
|
||||
- Command ``Gpios 255`` to show all possible GPIO configurations
|
||||
- Command ``SwitchText`` to change JSON switch names by barbudor (#9691)
|
||||
- Command ``SetOption114 1`` to detach Swiches from Relays and enable MQTT action state for all the SwitchModes returning `{"Switch1":{"Action":"ON"}}`
|
||||
- Command ``SetOption114 1`` to detach Switches from Relays and enable MQTT action state for all the SwitchModes returning `{"Switch1":{"Action":"ON"}}`
|
||||
- HM10 Beacon support and refactoring by Christian Baars (#9702)
|
||||
- Support for Hass discovery of TuyaMcu and Sonoff Ifan by Federico Leoni (#9727)
|
||||
- Initial support for iBeacons (Sensor52) on ESP32 using internal BLE by rvbglas (#9732)
|
||||
|
|
|
@ -64,7 +64,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
|
|||
- Command ``ShutterChange`` to increment change position (#9594)
|
||||
- Command ``SwitchMode 15`` sending only MQTT message on switch change (#9593)
|
||||
- Command ``SetOption113 1`` to set dimmer low on rotary dial after power off
|
||||
- Command ``SetOption114 1`` to detach Swiches from Relays and enable MQTT action state for all the SwitchModes
|
||||
- Command ``SetOption114 1`` to detach Switches from Relays and enable MQTT action state for all the SwitchModes
|
||||
- Command ``SwitchText`` to change JSON switch names by barbudor (#9691)
|
||||
- Zigbee command ``ZbData`` for better support of device specific data
|
||||
- Zigbee command ``ZbOccupancy`` to configure the time-out for PIR
|
||||
|
|
|
@ -139,7 +139,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
|||
typedef union { // Restricted by MISRA-C Rule 18.4 but so useful...
|
||||
uint32_t data; // Allow bit manipulation using SetOption
|
||||
struct { // SetOption114 .. SetOption145
|
||||
uint32_t mqtt_switches : 1; // bit 0 (V9.0.0.3) - SetOption114 - Detach Swiches from relays and enable MQTT action state for all the SwitchModes
|
||||
uint32_t mqtt_switches : 1; // bit 0 (V9.0.0.3) - SetOption114 - Detach Switches from relays and enable MQTT action state for all the SwitchModes
|
||||
//uint32_t spare00 : 1; // bit 0
|
||||
uint32_t spare01 : 1; // bit 1
|
||||
uint32_t spare02 : 1; // bit 2
|
||||
|
|
|
@ -410,13 +410,13 @@ void SwitchHandler(uint32_t mode) {
|
|||
Switch.last_state[i] = button;
|
||||
}
|
||||
if (switchflag <= POWER_TOGGLE) {
|
||||
if (!Settings.flag5.mqtt_switches) { // SetOption114 (0) - Detach Swiches from relays and enable MQTT action state for all the SwitchModes
|
||||
if (!Settings.flag5.mqtt_switches) { // SetOption114 (0) - Detach Switches from relays and enable MQTT action state for all the SwitchModes
|
||||
if (!SendKey(KEY_SWITCH, i +1, switchflag)) { // Execute command via MQTT
|
||||
ExecuteCommandPower(i +1, switchflag, SRC_SWITCH); // Execute command internally (if i < TasmotaGlobal.devices_present)
|
||||
}
|
||||
} else { mqtt_action = switchflag; }
|
||||
}
|
||||
if ((mqtt_action != POWER_NONE) && Settings.flag5.mqtt_switches) { // SetOption114 (0) - Detach Swiches from relays and enable MQTT action state for all the SwitchModes
|
||||
if ((mqtt_action != POWER_NONE) && Settings.flag5.mqtt_switches) { // SetOption114 (0) - Detach Switches from relays and enable MQTT action state for all the SwitchModes
|
||||
if (!Settings.flag.hass_discovery) { // SetOption19 - Control Home Assistant automatic discovery (See SetOption59)
|
||||
char mqtt_state_str[16];
|
||||
char *mqtt_state = mqtt_state_str;
|
||||
|
|
|
@ -168,7 +168,7 @@ a_setoption = [[
|
|||
"Use friendly name in zigbee topic (use with SetOption89)",
|
||||
"Set dimmer low on rotary dial after power off"
|
||||
],[
|
||||
"Detach Swiches from Relays and enable MQTT action state for all the SwitchModes",
|
||||
"Detach Switches from Relays and enable MQTT action state for all the SwitchModes",
|
||||
"","","",
|
||||
"","","","",
|
||||
"","","","",
|
||||
|
|
Loading…
Reference in New Issue