mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[safe_mode] Set safe mode core data in disabled cases (#6983)
This commit is contained in:
		| @@ -56,9 +56,7 @@ CONFIG_SCHEMA = cv.All( | ||||
|  | ||||
| @coroutine_with_priority(50.0) | ||||
| async def to_code(config): | ||||
|     if config[CONF_DISABLED]: | ||||
|         return | ||||
|  | ||||
|     if not config[CONF_DISABLED]: | ||||
|         var = cg.new_Pvariable(config[CONF_ID]) | ||||
|         await cg.register_component(var, config) | ||||
|  | ||||
| @@ -72,5 +70,6 @@ async def to_code(config): | ||||
|             config[CONF_BOOT_IS_GOOD_AFTER], | ||||
|         ) | ||||
|         cg.add(RawExpression(f"if ({condition}) return")) | ||||
|  | ||||
|     CORE.data[CONF_SAFE_MODE] = {} | ||||
|     CORE.data[CONF_SAFE_MODE][KEY_PAST_SAFE_MODE] = True | ||||
|   | ||||
		Reference in New Issue
	
	Block a user