mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
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
|
### Fixed
|
||||||
- Matter fixed UI bug when no endpoints configured
|
- Matter fixed UI bug when no endpoints configured
|
||||||
- Zigbee extend timeout for MCU reboot from 5s to 10s
|
- Zigbee extend timeout for MCU reboot from 5s to 10s
|
||||||
|
- Matter fix when Rules are disabled
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -84,28 +84,22 @@ class Matter_Device
|
|||||||
self.events = matter.EventHandler(self)
|
self.events = matter.EventHandler(self)
|
||||||
self.ui = matter.UI(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()
|
self.commissioning.init_basic_commissioning()
|
||||||
tasmota.add_driver(self)
|
tasmota.add_driver(self)
|
||||||
|
|
||||||
self.register_commands()
|
self.register_commands()
|
||||||
end
|
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
|
# Start Matter device server when the first network is coming up
|
||||||
def start()
|
def start()
|
||||||
@ -255,6 +249,7 @@ class Matter_Device
|
|||||||
# dispatch every 50ms
|
# dispatch every 50ms
|
||||||
# ticks
|
# ticks
|
||||||
def every_50ms()
|
def every_50ms()
|
||||||
|
self.check_network()
|
||||||
self.tick += 1
|
self.tick += 1
|
||||||
self.message_handler.every_50ms()
|
self.message_handler.every_50ms()
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user