mirror of
https://github.com/esphome/esphome.git
synced 2025-11-07 02:21:51 +00:00
Compare commits
14 Commits
2024.5.0b6
...
2024.5.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ee4348777 | ||
|
|
fcdf36e991 | ||
|
|
5eb8efd8b3 | ||
|
|
cd0f557940 | ||
|
|
efde677ca9 | ||
|
|
2eebee1de7 | ||
|
|
f235dcc096 | ||
|
|
d2d3db4b8c | ||
|
|
ec6d86c8f5 | ||
|
|
7452879fb1 | ||
|
|
4fc2f2284a | ||
|
|
840f69ffe6 | ||
|
|
caa8c820de | ||
|
|
0d3adc8f0c |
@@ -346,7 +346,7 @@ def upload_program(config, args, host):
|
||||
not is_ip_address(CORE.address) # pylint: disable=too-many-boolean-expressions
|
||||
and (get_port_type(host) == "MQTT" or config[CONF_MDNS][CONF_DISABLED])
|
||||
and CONF_MQTT in config
|
||||
and (not args.device or args.device == "MQTT")
|
||||
and (not args.device or args.device in ("MQTT", "OTA"))
|
||||
):
|
||||
from esphome import mqtt
|
||||
|
||||
|
||||
@@ -63,7 +63,13 @@ def validate_tolerance(value):
|
||||
if "%" in str(value):
|
||||
type_ = TYPE_PERCENTAGE
|
||||
else:
|
||||
try:
|
||||
cv.positive_time_period_microseconds(value)
|
||||
type_ = TYPE_TIME
|
||||
except cv.Invalid as exc:
|
||||
raise cv.Invalid(
|
||||
"Tolerance must be a percentage or time. Configurations made before 2024.5.0 treated the value as a percentage."
|
||||
) from exc
|
||||
|
||||
return TOLERANCE_SCHEMA(
|
||||
{
|
||||
|
||||
@@ -14,6 +14,9 @@ from esphome.const import (
|
||||
CONF_STATE,
|
||||
CONF_STOP,
|
||||
CONF_TRIGGER_ID,
|
||||
DEVICE_CLASS_EMPTY,
|
||||
DEVICE_CLASS_GAS,
|
||||
DEVICE_CLASS_WATER,
|
||||
)
|
||||
from esphome.core import CORE, coroutine_with_priority
|
||||
from esphome.cpp_helpers import setup_entity
|
||||
@@ -22,6 +25,12 @@ IS_PLATFORM_COMPONENT = True
|
||||
|
||||
CODEOWNERS = ["@esphome/core"]
|
||||
|
||||
DEVICE_CLASSES = [
|
||||
DEVICE_CLASS_EMPTY,
|
||||
DEVICE_CLASS_GAS,
|
||||
DEVICE_CLASS_WATER,
|
||||
]
|
||||
|
||||
valve_ns = cg.esphome_ns.namespace("valve")
|
||||
|
||||
Valve = valve_ns.class_("Valve", cg.EntityBase)
|
||||
@@ -65,6 +74,7 @@ VALVE_SCHEMA = cv.ENTITY_BASE_SCHEMA.extend(cv.MQTT_COMMAND_COMPONENT_SCHEMA).ex
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(Valve),
|
||||
cv.OnlyWith(CONF_MQTT_ID, "mqtt"): cv.declare_id(mqtt.MQTTValveComponent),
|
||||
cv.Optional(CONF_DEVICE_CLASS): cv.one_of(*DEVICE_CLASSES, lower=True),
|
||||
cv.Optional(CONF_POSITION_COMMAND_TOPIC): cv.All(
|
||||
cv.requires_component("mqtt"), cv.subscribe_topic
|
||||
),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
"""Constants used by esphome."""
|
||||
|
||||
__version__ = "2024.5.0b6"
|
||||
__version__ = "2024.5.2"
|
||||
|
||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||
|
||||
@@ -103,7 +103,7 @@ class DashboardEntries:
|
||||
|
||||
def all(self) -> list[DashboardEntry]:
|
||||
"""Return all entries."""
|
||||
return asyncio.run_coroutine_threadsafe(self._async_all, self._loop).result()
|
||||
return asyncio.run_coroutine_threadsafe(self._async_all(), self._loop).result()
|
||||
|
||||
def async_all(self) -> list[DashboardEntry]:
|
||||
"""Return all entries."""
|
||||
|
||||
@@ -3,6 +3,7 @@ remote_receiver:
|
||||
pin: ${pin}
|
||||
rmt_channel: ${rmt_channel}
|
||||
dump: all
|
||||
tolerance: 25%
|
||||
on_abbwelcome:
|
||||
then:
|
||||
- logger.log:
|
||||
|
||||
Reference in New Issue
Block a user