mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Fix dallas not unknown (#716)
* Fix dallas not sending unknown on disconnected sensor * Deep sleep
This commit is contained in:
		| @@ -1,7 +1,6 @@ | |||||||
| import esphome.codegen as cg | import esphome.codegen as cg | ||||||
| import esphome.config_validation as cv | import esphome.config_validation as cv | ||||||
| from esphome import pins, automation | from esphome import pins, automation | ||||||
| from esphome.automation import maybe_simple_id |  | ||||||
| from esphome.const import CONF_ID, CONF_MODE, CONF_NUMBER, CONF_PINS, CONF_RUN_CYCLES, \ | from esphome.const import CONF_ID, CONF_MODE, CONF_NUMBER, CONF_PINS, CONF_RUN_CYCLES, \ | ||||||
|     CONF_RUN_DURATION, CONF_SLEEP_DURATION, CONF_WAKEUP_PIN |     CONF_RUN_DURATION, CONF_SLEEP_DURATION, CONF_WAKEUP_PIN | ||||||
|  |  | ||||||
| @@ -85,7 +84,7 @@ def to_code(config): | |||||||
|     cg.add_define('USE_DEEP_SLEEP') |     cg.add_define('USE_DEEP_SLEEP') | ||||||
|  |  | ||||||
|  |  | ||||||
| DEEP_SLEEP_ACTION_SCHEMA = maybe_simple_id({ | DEEP_SLEEP_ACTION_SCHEMA = automation.maybe_simple_id({ | ||||||
|     cv.GenerateID(): cv.use_id(DeepSleepComponent), |     cv.GenerateID(): cv.use_id(DeepSleepComponent), | ||||||
| }) | }) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -73,10 +73,10 @@ mqtt: | |||||||
|             ESP_LOGD("main", "Got message %s", x.c_str()); |             ESP_LOGD("main", "Got message %s", x.c_str()); | ||||||
|     - topic: livingroom/ota_mode |     - topic: livingroom/ota_mode | ||||||
|       then: |       then: | ||||||
|       - deep_sleep.prevent: deep_sleep_1 |       - deep_sleep.prevent | ||||||
|     - topic: livingroom/ota_mode |     - topic: livingroom/ota_mode | ||||||
|       then: |       then: | ||||||
|       - deep_sleep.enter: deep_sleep_1 |       - deep_sleep.enter: | ||||||
|   on_json_message: |   on_json_message: | ||||||
|     topic: the/topic |     topic: the/topic | ||||||
|     then: |     then: | ||||||
| @@ -163,7 +163,6 @@ deep_sleep: | |||||||
|   sleep_duration: 50s |   sleep_duration: 50s | ||||||
|   wakeup_pin: GPIO39 |   wakeup_pin: GPIO39 | ||||||
|   wakeup_pin_mode: INVERT_WAKEUP |   wakeup_pin_mode: INVERT_WAKEUP | ||||||
|   id: deep_sleep_1 |  | ||||||
|  |  | ||||||
| ads1115: | ads1115: | ||||||
|   address: 0x48 |   address: 0x48 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user