diff --git a/custom_components/sws12500/const.py b/custom_components/sws12500/const.py index 755b885..393b2e5 100644 --- a/custom_components/sws12500/const.py +++ b/custom_components/sws12500/const.py @@ -69,6 +69,10 @@ INDOOR_HUMIDITY: Final = "indoor_humidity" UV: Final = "uv" CH2_TEMP: Final = "ch2_temp" CH2_HUMIDITY: Final = "ch2_humidity" +CH3_TEMP: Final = "ch3_temp" +CH3_HUMIDITY: Final = "ch3_humidity" +CH4_TEMP: Final = "ch4_temp" +CH4_HUMIDITY: Final = "ch4_humidity" HEAT_INDEX: Final = "heat_index" CHILL_INDEX: Final = "chill_index" @@ -89,9 +93,20 @@ REMAP_ITEMS: dict = { "UV": UV, "soiltempf": CH2_TEMP, "soilmoisture": CH2_HUMIDITY, + "soiltemp2f": CH3_TEMP, + "soilmoisture2": CH3_HUMIDITY, + "soiltemp3f": CH4_TEMP, + "soilmoisture3": CH4_HUMIDITY, } -DISABLED_BY_DEFAULT: Final = [CH2_TEMP, CH2_HUMIDITY] +DISABLED_BY_DEFAULT: Final = [ + CH2_TEMP, + CH2_HUMIDITY, + CH3_TEMP, + CH3_HUMIDITY, + CH4_TEMP, + CH4_HUMIDITY, +] class UnitOfDir(StrEnum): diff --git a/custom_components/sws12500/manifest.json b/custom_components/sws12500/manifest.json index 9cba867..48e7af5 100644 --- a/custom_components/sws12500/manifest.json +++ b/custom_components/sws12500/manifest.json @@ -10,6 +10,6 @@ "issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues", "requirements": [], "ssdp": [], - "version": "0.1.3.4", + "version": "0.1.3.5", "zeroconf": [] } diff --git a/custom_components/sws12500/sensor.py b/custom_components/sws12500/sensor.py index 985353a..1577bbc 100644 --- a/custom_components/sws12500/sensor.py +++ b/custom_components/sws12500/sensor.py @@ -218,6 +218,44 @@ SENSOR_TYPES: tuple[WeatherSensorEntityDescription, ...] = ( translation_key=CH2_HUMIDITY, value_fn=lambda data: cast(int, data), ), + WeatherSensorEntityDescription( + key=CH3_TEMP, + native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + suggested_unit_of_measurement=UnitOfTemperature.CELSIUS, + icon="mdi:weather-sunny", + translation_key=CH3_TEMP, + value_fn=lambda data: cast(float, data), + ), + WeatherSensorEntityDescription( + key=CH3_HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.HUMIDITY, + icon="mdi:weather-sunny", + translation_key=CH3_HUMIDITY, + value_fn=lambda data: cast(int, data), + ), + WeatherSensorEntityDescription( + key=CH4_TEMP, + native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + suggested_unit_of_measurement=UnitOfTemperature.CELSIUS, + icon="mdi:weather-sunny", + translation_key=CH4_TEMP, + value_fn=lambda data: cast(float, data), + ), + WeatherSensorEntityDescription( + key=CH4_HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.HUMIDITY, + icon="mdi:weather-sunny", + translation_key=CH4_HUMIDITY, + value_fn=lambda data: cast(int, data), + ), WeatherSensorEntityDescription( key=HEAT_INDEX, native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT, diff --git a/custom_components/sws12500/translations/cs.json b/custom_components/sws12500/translations/cs.json index bd127c7..dfc2b13 100644 --- a/custom_components/sws12500/translations/cs.json +++ b/custom_components/sws12500/translations/cs.json @@ -76,6 +76,10 @@ "solar_radiation": { "name": "Sluneční osvit" }, "ch2_temp": { "name": "Teplota senzoru 2" }, "ch2_humidity": { "name": "Vlhkost sensoru 2" }, + "ch3_temp": { "name": "Teplota senzoru 3" }, + "ch3_humidity": { "name": "Vlhkost sensoru 3" }, + "ch4_temp": { "name": "Teplota senzoru 4" }, + "ch4_humidity": { "name": "Vlhkost sensoru 4" }, "heat_index": { "name": "Tepelný index" }, "chill_index": { "name": "Pocitová teplota" }, "wind_azimut": { diff --git a/custom_components/sws12500/translations/en.json b/custom_components/sws12500/translations/en.json index f701d48..976657a 100644 --- a/custom_components/sws12500/translations/en.json +++ b/custom_components/sws12500/translations/en.json @@ -77,6 +77,10 @@ "solar_radiation": { "name": "Solar irradiance" }, "ch2_temp": { "name": "Channel 2 temperature" }, "ch2_humidity": { "name": "Channel 2 humidity" }, + "ch3_temp": { "name": "Channel 3 temperature" }, + "ch3_humidity": { "name": "Channel 3 humidity" }, + "ch4_temp": { "name": "Channel 4 temperature" }, + "ch4_humidity": { "name": "Channel 4 humidity" }, "heat_index": { "name": "Apparent temperature" }, "chill_index": { "name": "Wind chill" }, "wind_azimut": {