mirror of https://github.com/arendst/Tasmota.git
Reflect PVVX firmware reed switch status
The first bit of the flag field reflects reed switch status so this device can additionally be used to monitor the status of a door.
This commit is contained in:
parent
ab6b2d1321
commit
628c00f090
|
@ -1586,6 +1586,10 @@ void MI32ParseATCPacket(const uint8_t * _buf, uint32_t length, const uint8_t *ad
|
||||||
MIBLEsensors[_slot].bat = ppv_packet->battery_level;
|
MIBLEsensors[_slot].bat = ppv_packet->battery_level;
|
||||||
MIBLEsensors[_slot].eventType.bat = 1;
|
MIBLEsensors[_slot].eventType.bat = 1;
|
||||||
|
|
||||||
|
MIBLEsensors[_slot].Btn = (ppv_packet->flags) & 0x1; // First bit is reed switch status
|
||||||
|
MIBLEsensors[_slot].eventType.Btn = 1;
|
||||||
|
MIBLEsensors[_slot].feature.Btn = 1;
|
||||||
|
|
||||||
if(MI32.option.directBridgeMode) {
|
if(MI32.option.directBridgeMode) {
|
||||||
MIBLEsensors[_slot].shallSendMQTT = 1;
|
MIBLEsensors[_slot].shallSendMQTT = 1;
|
||||||
MI32.mode.shallTriggerTele = 1;
|
MI32.mode.shallTriggerTele = 1;
|
||||||
|
|
Loading…
Reference in New Issue