Fix dallas not unknown (#716)

* Fix dallas not sending unknown on disconnected sensor

* Deep sleep
This commit is contained in:
Otto Winter 2019-10-17 21:34:58 +02:00 committed by GitHub
parent 578e5a0d7a
commit 32195f77d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -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),
}) })

View file

@ -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