Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
Daniël Koek 2024-05-31 14:04:08 +01:00
commit d79d054ab8
6 changed files with 10 additions and 11 deletions

View file

@ -4,11 +4,11 @@ from esphome.const import (
STATE_CLASS_MEASUREMENT,
ICON_ARROW_EXPAND_VERTICAL,
DEVICE_CLASS_DISTANCE,
UNIT_MILLIMETER,
)
CODEOWNERS = ["@TH-Braemer"]
DEPENDENCIES = ["uart"]
UNIT_MILLIMETERS = "mm"
a02yyuw_ns = cg.esphome_ns.namespace("a02yyuw")
A02yyuwComponent = a02yyuw_ns.class_(
@ -17,7 +17,7 @@ A02yyuwComponent = a02yyuw_ns.class_(
CONFIG_SCHEMA = sensor.sensor_schema(
A02yyuwComponent,
unit_of_measurement=UNIT_MILLIMETERS,
unit_of_measurement=UNIT_MILLIMETER,
icon=ICON_ARROW_EXPAND_VERTICAL,
accuracy_decimals=0,
state_class=STATE_CLASS_MEASUREMENT,

View file

@ -12,13 +12,13 @@ from esphome.const import (
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
UNIT_CELSIUS,
UNIT_MILLIMETER,
ICON_THERMOMETER,
)
from . import RGModel, RG15Resolution, HydreonRGxxComponent
UNIT_INTENSITY = "intensity"
UNIT_MILLIMETERS = "mm"
UNIT_MILLIMETERS_PER_HOUR = "mm/h"
CONF_ACC = "acc"
@ -85,19 +85,19 @@ CONFIG_SCHEMA = cv.All(
),
cv.Optional(CONF_RESOLUTION): cv.enum(RG15_RESOLUTION, upper=False),
cv.Optional(CONF_ACC): sensor.sensor_schema(
unit_of_measurement=UNIT_MILLIMETERS,
unit_of_measurement=UNIT_MILLIMETER,
accuracy_decimals=2,
device_class=DEVICE_CLASS_PRECIPITATION,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_EVENT_ACC): sensor.sensor_schema(
unit_of_measurement=UNIT_MILLIMETERS,
unit_of_measurement=UNIT_MILLIMETER,
accuracy_decimals=2,
device_class=DEVICE_CLASS_PRECIPITATION,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_TOTAL_ACC): sensor.sensor_schema(
unit_of_measurement=UNIT_MILLIMETERS,
unit_of_measurement=UNIT_MILLIMETER,
accuracy_decimals=2,
device_class=DEVICE_CLASS_PRECIPITATION,
state_class=STATE_CLASS_TOTAL_INCREASING,

View file

@ -12,6 +12,7 @@ from esphome.const import (
CONF_TEMPERATURE,
DEVICE_CLASS_TEMPERATURE,
UNIT_CELSIUS,
UNIT_MILLIMETER,
STATE_CLASS_MEASUREMENT,
CONF_BATTERY_LEVEL,
DEVICE_CLASS_BATTERY,
@ -25,8 +26,6 @@ ICON_PROPANE_TANK = "mdi:propane-tank"
TANK_TYPE_CUSTOM = "CUSTOM"
UNIT_MILLIMETER = "mm"
def small_distance(value):
"""small_distance is stored in mm"""

View file

@ -12,6 +12,7 @@ from esphome.const import (
CONF_TEMPERATURE,
DEVICE_CLASS_TEMPERATURE,
UNIT_CELSIUS,
UNIT_MILLIMETER,
STATE_CLASS_MEASUREMENT,
CONF_BATTERY_LEVEL,
DEVICE_CLASS_BATTERY,
@ -26,8 +27,6 @@ ICON_PROPANE_TANK = "mdi:propane-tank"
TANK_TYPE_CUSTOM = "CUSTOM"
UNIT_MILLIMETER = "mm"
def small_distance(value):
"""small_distance is stored in mm"""

View file

@ -815,7 +815,7 @@ void VoiceAssistant::on_timer_event(const api::VoiceAssistantTimerEventResponse
};
this->timers_[timer.id] = timer;
ESP_LOGD(TAG, "Timer Event");
ESP_LOGD(TAG, " Type: %d", msg.event_type);
ESP_LOGD(TAG, " Type: %" PRId32, msg.event_type);
ESP_LOGD(TAG, " %s", timer.to_string().c_str());
switch (msg.event_type) {

View file

@ -1035,6 +1035,7 @@ UNIT_MICROSIEMENS_PER_CENTIMETER = "µS/cm"
UNIT_MICROSILVERTS_PER_HOUR = "µSv/h"
UNIT_MICROTESLA = "µT"
UNIT_MILLIGRAMS_PER_CUBIC_METER = "mg/m³"
UNIT_MILLIMETER = "mm"
UNIT_MILLISECOND = "ms"
UNIT_MILLISIEMENS_PER_CENTIMETER = "mS/cm"
UNIT_MINUTE = "min"