mirror of https://github.com/arendst/Tasmota.git
Matter fix when Rules are disabled (#22016)
This commit is contained in:
parent
645ce4a1ee
commit
8d6a4bd7be
|
@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Fixed
|
||||
- Matter fixed UI bug when no endpoints configured
|
||||
- Zigbee extend timeout for MCU reboot from 5s to 10s
|
||||
- Matter fix when Rules are disabled
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -84,28 +84,22 @@ class Matter_Device
|
|||
self.events = matter.EventHandler(self)
|
||||
self.ui = matter.UI(self)
|
||||
|
||||
if tasmota.wifi()['up'] || tasmota.eth()['up']
|
||||
self.start()
|
||||
end
|
||||
if !tasmota.wifi()['up']
|
||||
tasmota.add_rule("Wifi#Connected", def ()
|
||||
self.start()
|
||||
tasmota.remove_rule("Wifi#Connected", "matter_start")
|
||||
end, "matter_start")
|
||||
end
|
||||
if !tasmota.eth()['up']
|
||||
tasmota.add_rule("Eth#Connected", def ()
|
||||
self.start()
|
||||
tasmota.remove_rule("Eth#Connected", "matter_start")
|
||||
end, "matter_start")
|
||||
end
|
||||
|
||||
self.commissioning.init_basic_commissioning()
|
||||
tasmota.add_driver(self)
|
||||
|
||||
self.register_commands()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Check if the network just started
|
||||
def check_network()
|
||||
if self.started return end # abort if already started
|
||||
if tasmota.wifi()['up'] || tasmota.eth()['up']
|
||||
self.start()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#############################################################
|
||||
# Start Matter device server when the first network is coming up
|
||||
def start()
|
||||
|
@ -255,6 +249,7 @@ class Matter_Device
|
|||
# dispatch every 50ms
|
||||
# ticks
|
||||
def every_50ms()
|
||||
self.check_network()
|
||||
self.tick += 1
|
||||
self.message_handler.every_50ms()
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue