mirror of
https://github.com/esphome/esphome.git
synced 2025-11-09 19:41:49 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a06f4dbf4 | ||
|
|
49b618bb0c | ||
|
|
20ec3900be | ||
|
|
605be1a6ec | ||
|
|
33b67de32e |
@@ -113,7 +113,11 @@ LambdaCondition = esphomelib_ns.class_('LambdaCondition', Condition)
|
||||
|
||||
|
||||
def validate_automation(extra_schema=None, extra_validators=None, single=False):
|
||||
schema = AUTOMATION_SCHEMA.extend(extra_schema or {})
|
||||
if extra_schema is None:
|
||||
extra_schema = {}
|
||||
if isinstance(extra_schema, vol.Schema):
|
||||
extra_schema = extra_schema.schema
|
||||
schema = AUTOMATION_SCHEMA.extend(extra_schema)
|
||||
|
||||
def validator_(value):
|
||||
if isinstance(value, list):
|
||||
@@ -295,7 +299,7 @@ COMPONENT_UPDATE_ACTION_SCHEMA = maybe_simple_id({
|
||||
def component_update_action_to_code(config, action_id, arg_type, template_arg):
|
||||
for var in get_variable(config[CONF_ID]):
|
||||
yield None
|
||||
rhs = UpdateComponentAction.new(var)
|
||||
rhs = UpdateComponentAction.new(template_arg, var)
|
||||
type = UpdateComponentAction.template(template_arg)
|
||||
yield Pvariable(action_id, rhs, type=type)
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ from esphomeyaml.cpp_types import App, NoArg, PollingComponent, Trigger, esphome
|
||||
IntervalTrigger = esphomelib_ns.class_('IntervalTrigger', Trigger.template(NoArg), PollingComponent)
|
||||
|
||||
CONFIG_SCHEMA = automation.validate_automation(vol.Schema({
|
||||
vol.Required(CONF_ID): cv.declare_variable_id(IntervalTrigger),
|
||||
cv.GenerateID(): cv.declare_variable_id(IntervalTrigger),
|
||||
vol.Required(CONF_INTERVAL): cv.positive_time_period_milliseconds,
|
||||
}).extend(cv.COMPONENT_SCHEMA.schema))
|
||||
|
||||
|
||||
def to_code(config):
|
||||
for conf in config:
|
||||
rhs = App.register_component(IntervalTrigger.new(config[CONF_INTERVAL]))
|
||||
rhs = App.register_component(IntervalTrigger.new(conf[CONF_INTERVAL]))
|
||||
trigger = Pvariable(conf[CONF_ID], rhs)
|
||||
setup_component(trigger, conf)
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
MAJOR_VERSION = 1
|
||||
MINOR_VERSION = 10
|
||||
PATCH_VERSION = '0b1'
|
||||
PATCH_VERSION = '0b2'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
ESPHOMELIB_VERSION = '1.10.0b1'
|
||||
ESPHOMELIB_VERSION = '1.10.0b2'
|
||||
|
||||
ESP_PLATFORM_ESP32 = 'ESP32'
|
||||
ESP_PLATFORM_ESP8266 = 'ESP8266'
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<div class="container">
|
||||
{% for i, entry in enumerate(entries) %}
|
||||
<div class="row">
|
||||
<div class="col s8 offset-s2 m10 offset-m1 l12">
|
||||
<div class="col s12 m10 offset-m1 l12">
|
||||
<div class="card horizontal">
|
||||
<div class="card-image center-align">
|
||||
<div class="card-image center-align hide-on-small-only">
|
||||
<i class="material-icons very-large icon-grey">memory</i>
|
||||
</div>
|
||||
<div class="card-stacked">
|
||||
|
||||
@@ -187,9 +187,6 @@ def perform_ota(sock, password, file_handle, filename):
|
||||
|
||||
send_check(sock, result, 'auth result')
|
||||
receive_exactly(sock, 1, 'auth result', RESPONSE_AUTH_OK)
|
||||
else:
|
||||
if password:
|
||||
raise OTAError("Password specified, but ESP doesn't accept password!")
|
||||
|
||||
file_size_encoded = [
|
||||
(file_size >> 24) & 0xFF,
|
||||
|
||||
@@ -233,3 +233,8 @@ stepper:
|
||||
# Optional:
|
||||
acceleration: inf
|
||||
deceleration: inf
|
||||
|
||||
interval:
|
||||
interval: 5s
|
||||
then:
|
||||
- logger.log: "Interval Run"
|
||||
|
||||
Reference in New Issue
Block a user