Merge pull request #78 from schizza/77-wbgt-temperature-sensor-wslink-api-parameter-t1wbgt
Adds WBGT temperature sensor via WSLinkchore/assets v1.6.8
commit
59116a6c48
|
|
@ -91,6 +91,7 @@ CH4_HUMIDITY: Final = "ch4_humidity"
|
||||||
CH4_CONNECTION: Final = "ch4_connection"
|
CH4_CONNECTION: Final = "ch4_connection"
|
||||||
HEAT_INDEX: Final = "heat_index"
|
HEAT_INDEX: Final = "heat_index"
|
||||||
CHILL_INDEX: Final = "chill_index"
|
CHILL_INDEX: Final = "chill_index"
|
||||||
|
WBGT_TEMP: Final = "wbgt_temp"
|
||||||
|
|
||||||
|
|
||||||
REMAP_ITEMS: dict[str, str] = {
|
REMAP_ITEMS: dict[str, str] = {
|
||||||
|
|
@ -145,6 +146,7 @@ REMAP_WSLINK_ITEMS: dict[str, str] = {
|
||||||
"t1bat": OUTSIDE_BATTERY,
|
"t1bat": OUTSIDE_BATTERY,
|
||||||
"inbat": INDOOR_BATTERY,
|
"inbat": INDOOR_BATTERY,
|
||||||
"t234c1bat": CH2_BATTERY,
|
"t234c1bat": CH2_BATTERY,
|
||||||
|
"t1wbgt": WBGT_TEMP,
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: Add more sensors
|
# TODO: Add more sensors
|
||||||
|
|
@ -163,6 +165,7 @@ DISABLED_BY_DEFAULT: Final = [
|
||||||
CH4_TEMP,
|
CH4_TEMP,
|
||||||
CH4_HUMIDITY,
|
CH4_HUMIDITY,
|
||||||
OUTSIDE_BATTERY,
|
OUTSIDE_BATTERY,
|
||||||
|
WBGT_TEMP,
|
||||||
]
|
]
|
||||||
|
|
||||||
BATTERY_LIST = [
|
BATTERY_LIST = [
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@
|
||||||
"issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues",
|
"issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"ssdp": [],
|
"ssdp": [],
|
||||||
"version": "1.6.7",
|
"version": "1.6.8",
|
||||||
"zeroconf": []
|
"zeroconf": []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ from .const import (
|
||||||
WIND_SPEED,
|
WIND_SPEED,
|
||||||
YEARLY_RAIN,
|
YEARLY_RAIN,
|
||||||
UnitOfDir,
|
UnitOfDir,
|
||||||
|
WBGT_TEMP,
|
||||||
)
|
)
|
||||||
from .sensors_common import WeatherSensorEntityDescription
|
from .sensors_common import WeatherSensorEntityDescription
|
||||||
from .utils import battery_level_to_icon, battery_level_to_text, wind_dir_to_text
|
from .utils import battery_level_to_icon, battery_level_to_text, wind_dir_to_text
|
||||||
|
|
@ -131,7 +132,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
|
||||||
WeatherSensorEntityDescription(
|
WeatherSensorEntityDescription(
|
||||||
key=WIND_DIR,
|
key=WIND_DIR,
|
||||||
native_unit_of_measurement=DEGREE,
|
native_unit_of_measurement=DEGREE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=None,
|
||||||
device_class=SensorDeviceClass.WIND_DIRECTION,
|
device_class=SensorDeviceClass.WIND_DIRECTION,
|
||||||
suggested_display_precision=None,
|
suggested_display_precision=None,
|
||||||
icon="mdi:sign-direction",
|
icon="mdi:sign-direction",
|
||||||
|
|
@ -150,7 +151,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
|
||||||
key=RAIN,
|
key=RAIN,
|
||||||
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||||
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
suggested_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
suggested_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
|
||||||
suggested_display_precision=2,
|
suggested_display_precision=2,
|
||||||
icon="mdi:weather-pouring",
|
icon="mdi:weather-pouring",
|
||||||
|
|
@ -330,4 +331,14 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
value_fn=lambda data: battery_level_to_text(data),
|
value_fn=lambda data: battery_level_to_text(data),
|
||||||
),
|
),
|
||||||
|
WeatherSensorEntityDescription(
|
||||||
|
key=WBGT_TEMP,
|
||||||
|
translation_key=WBGT_TEMP,
|
||||||
|
icon="mdi:thermometer",
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
suggested_display_precision=2,
|
||||||
|
value_fn=lambda data: cast("int", data),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@
|
||||||
"weekly_rain": { "name": "Týdenní úhrn srážek" },
|
"weekly_rain": { "name": "Týdenní úhrn srážek" },
|
||||||
"monthly_rain": { "name": "Měsíční úhrn srážek" },
|
"monthly_rain": { "name": "Měsíční úhrn srážek" },
|
||||||
"yearly_rain": { "name": "Roční úhrn srážek" },
|
"yearly_rain": { "name": "Roční úhrn srážek" },
|
||||||
|
"wbgt_temp": { "name": "WBGT index" },
|
||||||
"wind_azimut": {
|
"wind_azimut": {
|
||||||
"name": "Azimut",
|
"name": "Azimut",
|
||||||
"state": {
|
"state": {
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@
|
||||||
"weekly_rain": { "name": "Weekly precipitation" },
|
"weekly_rain": { "name": "Weekly precipitation" },
|
||||||
"monthly_rain": { "name": "Monthly precipitation" },
|
"monthly_rain": { "name": "Monthly precipitation" },
|
||||||
"yearly_rain": { "name": "Yearly precipitation" },
|
"yearly_rain": { "name": "Yearly precipitation" },
|
||||||
|
"wbgt_index": { "name": "WBGT index" },
|
||||||
"wind_azimut": {
|
"wind_azimut": {
|
||||||
"name": "Bearing",
|
"name": "Bearing",
|
||||||
"state": {
|
"state": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue