mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 12:46:22 +01:00
commit
50848c2f4d
@ -27,7 +27,7 @@ RUN \
|
|||||||
python3-cryptography=3.3.2-1 \
|
python3-cryptography=3.3.2-1 \
|
||||||
iputils-ping=3:20210202-1 \
|
iputils-ping=3:20210202-1 \
|
||||||
git=1:2.30.2-1 \
|
git=1:2.30.2-1 \
|
||||||
curl=7.74.0-1.3+b1 \
|
curl=7.74.0-1.3+deb11u1 \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/{cache,log}/* \
|
/var/{cache,log}/* \
|
||||||
@ -64,7 +64,7 @@ RUN \
|
|||||||
|
|
||||||
# Copy esphome and install
|
# Copy esphome and install
|
||||||
COPY . /esphome
|
COPY . /esphome
|
||||||
RUN pip3 install --no-cache-dir -e /esphome
|
RUN pip3 install --no-cache-dir /esphome
|
||||||
|
|
||||||
# Settings for dashboard
|
# Settings for dashboard
|
||||||
ENV USERNAME="" PASSWORD=""
|
ENV USERNAME="" PASSWORD=""
|
||||||
@ -112,7 +112,7 @@ RUN \
|
|||||||
|
|
||||||
# Copy esphome and install
|
# Copy esphome and install
|
||||||
COPY . /esphome
|
COPY . /esphome
|
||||||
RUN pip3 install --no-cache-dir -e /esphome
|
RUN pip3 install --no-cache-dir /esphome
|
||||||
|
|
||||||
# Labels
|
# Labels
|
||||||
LABEL \
|
LABEL \
|
||||||
|
@ -33,7 +33,7 @@ DHT = dht_ns.class_("DHT", cg.PollingComponent)
|
|||||||
CONFIG_SCHEMA = cv.Schema(
|
CONFIG_SCHEMA = cv.Schema(
|
||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(DHT),
|
cv.GenerateID(): cv.declare_id(DHT),
|
||||||
cv.Required(CONF_PIN): pins.gpio_input_pin_schema,
|
cv.Required(CONF_PIN): pins.internal_gpio_input_pin_schema,
|
||||||
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
|
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(
|
||||||
unit_of_measurement=UNIT_CELSIUS,
|
unit_of_measurement=UNIT_CELSIUS,
|
||||||
accuracy_decimals=1,
|
accuracy_decimals=1,
|
||||||
|
@ -22,7 +22,8 @@ AUTO_LOAD = ["json", "web_server_base"]
|
|||||||
web_server_ns = cg.esphome_ns.namespace("web_server")
|
web_server_ns = cg.esphome_ns.namespace("web_server")
|
||||||
WebServer = web_server_ns.class_("WebServer", cg.Component, cg.Controller)
|
WebServer = web_server_ns.class_("WebServer", cg.Component, cg.Controller)
|
||||||
|
|
||||||
CONFIG_SCHEMA = cv.Schema(
|
CONFIG_SCHEMA = cv.All(
|
||||||
|
cv.Schema(
|
||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(WebServer),
|
cv.GenerateID(): cv.declare_id(WebServer),
|
||||||
cv.Optional(CONF_PORT, default=80): cv.port,
|
cv.Optional(CONF_PORT, default=80): cv.port,
|
||||||
@ -36,8 +37,12 @@ CONFIG_SCHEMA = cv.Schema(
|
|||||||
cv.Optional(CONF_JS_INCLUDE): cv.file_,
|
cv.Optional(CONF_JS_INCLUDE): cv.file_,
|
||||||
cv.Optional(CONF_AUTH): cv.Schema(
|
cv.Optional(CONF_AUTH): cv.Schema(
|
||||||
{
|
{
|
||||||
cv.Required(CONF_USERNAME): cv.All(cv.string_strict, cv.Length(min=1)),
|
cv.Required(CONF_USERNAME): cv.All(
|
||||||
cv.Required(CONF_PASSWORD): cv.All(cv.string_strict, cv.Length(min=1)),
|
cv.string_strict, cv.Length(min=1)
|
||||||
|
),
|
||||||
|
cv.Required(CONF_PASSWORD): cv.All(
|
||||||
|
cv.string_strict, cv.Length(min=1)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
cv.GenerateID(CONF_WEB_SERVER_BASE_ID): cv.use_id(
|
cv.GenerateID(CONF_WEB_SERVER_BASE_ID): cv.use_id(
|
||||||
@ -45,8 +50,10 @@ CONFIG_SCHEMA = cv.Schema(
|
|||||||
),
|
),
|
||||||
cv.Optional(CONF_INCLUDE_INTERNAL, default=False): cv.boolean,
|
cv.Optional(CONF_INCLUDE_INTERNAL, default=False): cv.boolean,
|
||||||
cv.Optional(CONF_OTA, default=True): cv.boolean,
|
cv.Optional(CONF_OTA, default=True): cv.boolean,
|
||||||
}
|
},
|
||||||
).extend(cv.COMPONENT_SCHEMA)
|
).extend(cv.COMPONENT_SCHEMA),
|
||||||
|
cv.only_with_arduino,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@coroutine_with_priority(40.0)
|
@coroutine_with_priority(40.0)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""Constants used by esphome."""
|
"""Constants used by esphome."""
|
||||||
|
|
||||||
__version__ = "2021.12.2"
|
__version__ = "2021.12.3"
|
||||||
|
|
||||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user