Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/components/awair/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import logging

API_CO2 = "carbon_dioxide"
API_DEW_POINT = "dew_point"
API_DUST = "dust"
API_HUMID = "humidity"
API_LUX = "illuminance"
Expand Down
10 changes: 10 additions & 0 deletions homeassistant/components/awair/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

from .const import (
API_CO2,
API_DEW_POINT,
API_DUST,
API_HUMID,
API_LUX,
Expand Down Expand Up @@ -110,6 +111,15 @@ class AwairSensorEntityDescription(SensorEntityDescription):
unique_id_tag="CO2", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_DEW_POINT,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
translation_key="dew_point",
unique_id_tag="dew_point",
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
)

SENSOR_TYPES_DUST: tuple[AwairSensorEntityDescription, ...] = (
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/awair/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
},
"sound_level": {
"name": "Sound level"
},
"dew_point": {
"name": "Dew point"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/axis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: AxisConfigEntry)
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
hub.setup()

config_entry.add_update_listener(hub.async_new_address_callback)
config_entry.async_on_unload(
config_entry.add_update_listener(hub.async_new_address_callback)
)
config_entry.async_on_unload(hub.teardown)
config_entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, hub.shutdown)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"mqtt": ["esphome/discover/#"],
"quality_scale": "platinum",
"requirements": [
"aioesphomeapi==34.1.0",
"aioesphomeapi==34.2.0",
"esphome-dashboard-api==1.3.0",
"bleak-esphome==2.16.0"
],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lifx/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"iot_class": "local_polling",
"loggers": ["aiolifx", "aiolifx_effects", "bitstring"],
"requirements": [
"aiolifx==1.2.0",
"aiolifx==1.2.1",
"aiolifx-effects==0.3.2",
"aiolifx-themes==0.6.4"
]
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/openai_conversation/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
RECOMMENDED_WEB_SEARCH_CONTEXT_SIZE,
RECOMMENDED_WEB_SEARCH_USER_LOCATION,
UNSUPPORTED_MODELS,
WEB_SEARCH_MODELS,
UNSUPPORTED_WEB_SEARCH_MODELS,
)

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -320,7 +320,7 @@ async def async_step_model(
elif CONF_REASONING_EFFORT in options:
options.pop(CONF_REASONING_EFFORT)

if model.startswith(tuple(WEB_SEARCH_MODELS)):
if not model.startswith(tuple(UNSUPPORTED_WEB_SEARCH_MODELS)):
step_schema.update(
{
vol.Optional(
Expand Down
13 changes: 6 additions & 7 deletions homeassistant/components/openai_conversation/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"gpt-4o-mini-realtime-preview-2024-12-17",
]

WEB_SEARCH_MODELS: list[str] = [
"gpt-4.1",
"gpt-4.1-mini",
"gpt-4o",
"gpt-4o-search-preview",
"gpt-4o-mini",
"gpt-4o-mini-search-preview",
UNSUPPORTED_WEB_SEARCH_MODELS: list[str] = [
"gpt-3.5",
"gpt-4-turbo",
"gpt-4.1-nano",
"o1",
"o3-mini",
]
94 changes: 47 additions & 47 deletions homeassistant/components/tuya/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,40 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
# end up being a binary sensor.
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
# CO2 Detector
# https://developer.tuya.com/en/docs/iot/categoryco2bj?id=Kaiuz3wes7yuy
"co2bj": (
TuyaBinarySensorEntityDescription(
key=DPCode.CO2_STATE,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="alarm",
),
TAMPER_BINARY_SENSOR,
),
# CO Detector
# https://developer.tuya.com/en/docs/iot/categorycobj?id=Kaiuz3u1j6q1v
"cobj": (
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATE,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="1",
),
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATUS,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="alarm",
),
TAMPER_BINARY_SENSOR,
),
# Smart Pet Feeder
# https://developer.tuya.com/en/docs/iot/categorycwwsq?id=Kaiuz2b6vydld
"cwwsq": (
TuyaBinarySensorEntityDescription(
key=DPCode.FEED_STATE,
translation_key="feeding",
on_value="feeding",
),
),
# Multi-functional Sensor
# https://developer.tuya.com/en/docs/iot/categorydgnbj?id=Kaiuz3yorvzg3
"dgnbj": (
Expand Down Expand Up @@ -111,40 +145,6 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
),
TAMPER_BINARY_SENSOR,
),
# CO2 Detector
# https://developer.tuya.com/en/docs/iot/categoryco2bj?id=Kaiuz3wes7yuy
"co2bj": (
TuyaBinarySensorEntityDescription(
key=DPCode.CO2_STATE,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="alarm",
),
TAMPER_BINARY_SENSOR,
),
# CO Detector
# https://developer.tuya.com/en/docs/iot/categorycobj?id=Kaiuz3u1j6q1v
"cobj": (
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATE,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="1",
),
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATUS,
device_class=BinarySensorDeviceClass.SAFETY,
on_value="alarm",
),
TAMPER_BINARY_SENSOR,
),
# Smart Pet Feeder
# https://developer.tuya.com/en/docs/iot/categorycwwsq?id=Kaiuz2b6vydld
"cwwsq": (
TuyaBinarySensorEntityDescription(
key=DPCode.FEED_STATE,
translation_key="feeding",
on_value="feeding",
),
),
# Human Presence Sensor
# https://developer.tuya.com/en/docs/iot/categoryhps?id=Kaiuz42yhn1hs
"hps": (
Expand Down Expand Up @@ -174,6 +174,16 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
),
TAMPER_BINARY_SENSOR,
),
# Luminance Sensor
# https://developer.tuya.com/en/docs/iot/categoryldcg?id=Kaiuz3n7u69l8
"ldcg": (
TuyaBinarySensorEntityDescription(
key=DPCode.TEMPER_ALARM,
device_class=BinarySensorDeviceClass.TAMPER,
entity_category=EntityCategory.DIAGNOSTIC,
),
TAMPER_BINARY_SENSOR,
),
# Door and Window Controller
# https://developer.tuya.com/en/docs/iot/s?id=K9gf48r5zjsy9
"mc": (
Expand Down Expand Up @@ -205,16 +215,6 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
on_value={"AQAB"},
),
),
# Luminance Sensor
# https://developer.tuya.com/en/docs/iot/categoryldcg?id=Kaiuz3n7u69l8
"ldcg": (
TuyaBinarySensorEntityDescription(
key=DPCode.TEMPER_ALARM,
device_class=BinarySensorDeviceClass.TAMPER,
entity_category=EntityCategory.DIAGNOSTIC,
),
TAMPER_BINARY_SENSOR,
),
# PIR Detector
# https://developer.tuya.com/en/docs/iot/categorypir?id=Kaiuz3ss11b80
"pir": (
Expand All @@ -235,6 +235,9 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
),
TAMPER_BINARY_SENSOR,
),
# Temperature and Humidity Sensor with External Probe
# New undocumented category qxj, see https://github.com/home-assistant/core/issues/136472
"qxj": (TAMPER_BINARY_SENSOR,),
# Gas Detector
# https://developer.tuya.com/en/docs/iot/categoryrqbj?id=Kaiuz3d162ubw
"rqbj": (
Expand Down Expand Up @@ -291,9 +294,6 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
# Temperature and Humidity Sensor
# https://developer.tuya.com/en/docs/iot/categorywsdcg?id=Kaiuz3hinij34
"wsdcg": (TAMPER_BINARY_SENSOR,),
# Temperature and Humidity Sensor with External Probe
# New undocumented category qxj, see https://github.com/home-assistant/core/issues/136472
"qxj": (TAMPER_BINARY_SENSOR,),
# Pressure Sensor
# https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
"ylcg": (
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/tuya/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
# All descriptions can be found here.
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
# Wake Up Light II
# Not documented
"hxd": (
ButtonEntityDescription(
key=DPCode.SWITCH_USB6,
translation_key="snooze",
),
),
# Robot Vacuum
# https://developer.tuya.com/en/docs/iot/fsd?id=K9gf487ck1tlo
"sd": (
Expand Down Expand Up @@ -46,14 +54,6 @@
entity_category=EntityCategory.CONFIG,
),
),
# Wake Up Light II
# Not documented
"hxd": (
ButtonEntityDescription(
key=DPCode.SWITCH_USB6,
translation_key="snooze",
),
),
}


Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/tuya/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# All descriptions can be found here:
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
CAMERAS: tuple[str, ...] = (
# Smart Camera (including doorbells)
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
"sp",
# Smart Camera - Low power consumption camera
# Undocumented, see https://github.com/home-assistant/core/issues/132844
"dghsxj",
# Smart Camera (including doorbells)
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
"sp",
)


Expand Down
9 changes: 6 additions & 3 deletions homeassistant/components/tuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class TuyaClimateEntityDescription(ClimateEntityDescription):


CLIMATE_DESCRIPTIONS: dict[str, TuyaClimateEntityDescription] = {
# Electric Fireplace
# https://developer.tuya.com/en/docs/iot/f?id=Kacpeobojffop
"dbl": TuyaClimateEntityDescription(
key="dbl",
switch_only_hvac_mode=HVACMode.HEAT,
),
# Air conditioner
# https://developer.tuya.com/en/docs/iot/categorykt?id=Kaiuz0z71ov2n
"kt": TuyaClimateEntityDescription(
Expand Down Expand Up @@ -77,9 +83,6 @@ class TuyaClimateEntityDescription(ClimateEntityDescription):
key="wkf",
switch_only_hvac_mode=HVACMode.HEAT,
),
# Electric Fireplace
# https://developer.tuya.com/en/docs/iot/f?id=Kacpeobojffop
"dbl": TuyaClimateEntityDescription(key="dbl", switch_only_hvac_mode=HVACMode.HEAT),
}


Expand Down
50 changes: 25 additions & 25 deletions homeassistant/components/tuya/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,31 @@ class TuyaCoverEntityDescription(CoverEntityDescription):


COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
# Garage Door Opener
# https://developer.tuya.com/en/docs/iot/categoryckmkzq?id=Kaiuz0ipcboee
"ckmkzq": (
TuyaCoverEntityDescription(
key=DPCode.SWITCH_1,
translation_key="door",
current_state=DPCode.DOORCONTACT_STATE,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
TuyaCoverEntityDescription(
key=DPCode.SWITCH_2,
translation_key="door_2",
current_state=DPCode.DOORCONTACT_STATE_2,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
TuyaCoverEntityDescription(
key=DPCode.SWITCH_3,
translation_key="door_3",
current_state=DPCode.DOORCONTACT_STATE_3,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
),
# Curtain
# Note: Multiple curtains isn't documented
# https://developer.tuya.com/en/docs/iot/categorycl?id=Kaiuz1hnpo7df
Expand Down Expand Up @@ -84,31 +109,6 @@ class TuyaCoverEntityDescription(CoverEntityDescription):
device_class=CoverDeviceClass.BLIND,
),
),
# Garage Door Opener
# https://developer.tuya.com/en/docs/iot/categoryckmkzq?id=Kaiuz0ipcboee
"ckmkzq": (
TuyaCoverEntityDescription(
key=DPCode.SWITCH_1,
translation_key="door",
current_state=DPCode.DOORCONTACT_STATE,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
TuyaCoverEntityDescription(
key=DPCode.SWITCH_2,
translation_key="door_2",
current_state=DPCode.DOORCONTACT_STATE_2,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
TuyaCoverEntityDescription(
key=DPCode.SWITCH_3,
translation_key="door_3",
current_state=DPCode.DOORCONTACT_STATE_3,
current_state_inverse=True,
device_class=CoverDeviceClass.GARAGE,
),
),
# Curtain Switch
# https://developer.tuya.com/en/docs/iot/category-clkg?id=Kaiuz0gitil39
"clkg": (
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tuya/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
from .entity import EnumTypeData, IntegerTypeData, TuyaEntity

TUYA_SUPPORT_TYPE = {
"cs", # Dehumidifier
"fs", # Fan
"fsd", # Fan with Light
"fskg", # Fan wall switch
"kj", # Air Purifier
"cs", # Dehumidifier
}


Expand Down
Loading
Loading