mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 07:17:16 +00:00
Matter allow Matter#Initialized
rule once the device is configured (#18451)
This commit is contained in:
parent
fb98d8954a
commit
a85412fce2
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
||||
### Added
|
||||
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
|
||||
- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
|
||||
- Matter allow `Matter#Initialized` rule once the device is configured
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
@ -104,6 +104,8 @@ class Matter_Device
|
||||
self._init_basic_commissioning()
|
||||
|
||||
tasmota.add_driver(self)
|
||||
|
||||
self.register_commands()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
@ -1011,7 +1013,7 @@ class Matter_Device
|
||||
end
|
||||
if endpoint > 0x40 break end
|
||||
end
|
||||
|
||||
tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
|
||||
end
|
||||
|
||||
# get keys of a map in sorted order
|
||||
@ -1019,6 +1021,30 @@ class Matter_Device
|
||||
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
|
||||
end
|
||||
|
||||
#####################################################################
|
||||
# Commands `Mtr___`
|
||||
#####################################################################
|
||||
#
|
||||
def register_commands()
|
||||
tasmota.add_cmd("MtrJoin", /cmd_found, idx, payload, payload_json -> self.MtrJoin(cmd_found, idx, payload, payload_json))
|
||||
end
|
||||
|
||||
#####################################################################
|
||||
# `MtrJoin`
|
||||
#
|
||||
# Open or close commissioning
|
||||
#
|
||||
def MtrJoin(cmd_found, idx, payload, payload_json)
|
||||
var payload_int = int(payload)
|
||||
if payload_int
|
||||
self.start_root_basic_commissioning()
|
||||
else
|
||||
self.stop_basic_commissioning()
|
||||
end
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
matter.Device = Matter_Device
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user