Compare commits

...

9 Commits

Author SHA1 Message Date
Lukas Svoboda 4ccc37951d
Bump version from 1.6.8 to 1.6.9 2025-10-26 22:00:39 +01:00
Lukas Svoboda 688bb9e374
Merge pull request #79 from schizza/chore/assets
Maintenance, adds workflow for ZIP assets in releases.
Updated README to view downloaded counts.
2025-10-26 21:59:35 +01:00
schizza b3032d072f
Adds assets for HACS integration
Adds download badges to the README for better visibility
and includes zip release and filename options in the HACS
manifest to enable direct downloads through HACS.
2025-10-26 21:53:58 +01:00
schizza a2bc74c2ad
Adds workflow to publish ZIP asset on release
Creates a GitHub Actions workflow that automatically builds a ZIP archive of the custom component and attaches it to new releases.
This simplifies distribution and installation for users.
2025-10-26 21:49:22 +01:00
Lukas Svoboda 59116a6c48
Merge pull request #78 from schizza/77-wbgt-temperature-sensor-wslink-api-parameter-t1wbgt
Adds WBGT temperature sensor via WSLink
2025-10-26 21:40:36 +01:00
schizza 06a8a7ff1b
Adds WBGT temperature sensor via WSLink
Adds the Wet Bulb Globe Temperature (WBGT) sensor to the integration, pulling data via the WSLink API.

Corrects the state class for rain and wind direction.
2025-10-26 21:39:31 +01:00
Lukas Svoboda 1d8928bf12
Merge pull request #76 from schizza/74-additional-sensors
Release 1.6.7
2025-10-26 21:03:23 +01:00
schizza 397005bd3f
Updates component version to 1.6.7
Bump version

This reflects changes introduced in the '74-additional-sensors'
branch.
2025-10-26 21:02:13 +01:00
schizza 80909e88c0
Adds indoor and channel 2 battery sensors
Adds support for displaying indoor console and channel 2 battery levels as sensors.

Updates sensor logic to use a common list to determine icon representation

Fixes #74
2025-10-26 20:59:57 +01:00
9 changed files with 113 additions and 13 deletions

21
.github/workflows/publish-assets.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Build & Attach ZIP asset
on:
release:
types: [published]
jobs:
build-zip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create ZIP
run: |
mkdir -p dist
cd custom_components/sws12500
zip -r ../../dist/weather-station.zip . -x "*/__pycache__/*"
- name: Upload ZIP to release
uses: softprops/action-gh-release@v2
with:
files: dist/weather-station.zip

View File

@ -1,3 +1,6 @@
![GitHub Downloads](https://img.shields.io/github/downloads/schizza/SWS-12500-custom-component/total?label=downloads%20%28all%20releases%29)
![Latest release downloads](https://img.shields.io/github/downloads/schizza/SWS-12500-custom-component/latest/total?label=downloads%20%28latest%29)
# Integrates your Sencor SWS 12500 or 16600, GARNI, BRESSER weather stations seamlessly into Home Assistant
This integration will listen for data from your station and passes them to respective sensors. It also provides the ability to push data to Windy API.

View File

@ -23,12 +23,8 @@ WSLINK: Final = "wslink"
WINDY_API_KEY = "WINDY_API_KEY"
WINDY_ENABLED: Final = "windy_enabled_checkbox"
WINDY_LOGGER_ENABLED: Final = "windy_logger_checkbox"
WINDY_NOT_INSERTED: Final = (
"Data was succefuly sent to Windy, but not inserted by Windy API. Does anyone else sent data to Windy?"
)
WINDY_INVALID_KEY: Final = (
"Windy API KEY is invalid. Send data to Windy is now disabled. Check your API KEY and try again."
)
WINDY_NOT_INSERTED: Final = "Data was succefuly sent to Windy, but not inserted by Windy API. Does anyone else sent data to Windy?"
WINDY_INVALID_KEY: Final = "Windy API KEY is invalid. Send data to Windy is now disabled. Check your API KEY and try again."
WINDY_SUCCESS: Final = (
"Windy successfully sent data and data was successfully inserted by Windy API"
)
@ -81,10 +77,12 @@ DAILY_RAIN: Final = "daily_rain"
SOLAR_RADIATION: Final = "solar_radiation"
INDOOR_TEMP: Final = "indoor_temp"
INDOOR_HUMIDITY: Final = "indoor_humidity"
INDOOR_BATTERY: Final = "indoor_battery"
UV: Final = "uv"
CH2_TEMP: Final = "ch2_temp"
CH2_HUMIDITY: Final = "ch2_humidity"
CH2_CONNECTION: Final = "ch2_connection"
CH2_BATTERY: Final = "ch2_battery"
CH3_TEMP: Final = "ch3_temp"
CH3_HUMIDITY: Final = "ch3_humidity"
CH3_CONNECTION: Final = "ch3_connection"
@ -93,9 +91,10 @@ CH4_HUMIDITY: Final = "ch4_humidity"
CH4_CONNECTION: Final = "ch4_connection"
HEAT_INDEX: Final = "heat_index"
CHILL_INDEX: Final = "chill_index"
WBGT_TEMP: Final = "wbgt_temp"
REMAP_ITEMS: dict = {
REMAP_ITEMS: dict[str, str] = {
"baromin": BARO_PRESSURE,
"tempf": OUTSIDE_TEMP,
"dewptf": DEW_POINT,
@ -117,7 +116,7 @@ REMAP_ITEMS: dict = {
"soilmoisture3": CH4_HUMIDITY,
}
REMAP_WSLINK_ITEMS: dict = {
REMAP_WSLINK_ITEMS: dict[str, str] = {
"intem": INDOOR_TEMP,
"inhum": INDOOR_HUMIDITY,
"t1tem": OUTSIDE_TEMP,
@ -145,6 +144,9 @@ REMAP_WSLINK_ITEMS: dict = {
"t234c2tem": CH3_TEMP,
"t234c2hum": CH3_HUMIDITY,
"t1bat": OUTSIDE_BATTERY,
"inbat": INDOOR_BATTERY,
"t234c1bat": CH2_BATTERY,
"t1wbgt": WBGT_TEMP,
}
# TODO: Add more sensors
@ -157,11 +159,19 @@ REMAP_WSLINK_ITEMS: dict = {
DISABLED_BY_DEFAULT: Final = [
CH2_TEMP,
CH2_HUMIDITY,
CH2_BATTERY,
CH3_TEMP,
CH3_HUMIDITY,
CH4_TEMP,
CH4_HUMIDITY,
OUTSIDE_BATTERY,
WBGT_TEMP,
]
BATTERY_LIST = [
OUTSIDE_BATTERY,
INDOOR_BATTERY,
CH2_BATTERY,
]

View File

@ -10,6 +10,6 @@
"issue_tracker": "https://github.com/schizza/SWS-12500-custom-component/issues",
"requirements": [],
"ssdp": [],
"version": "1.6.6",
"version": "1.6.9",
"zeroconf": []
}

View File

@ -23,6 +23,7 @@ from .const import (
WIND_DIR,
WIND_SPEED,
WSLINK,
BATTERY_LIST,
)
from .sensors_common import WeatherSensorEntityDescription
from .sensors_weather import SENSOR_TYPES_WEATHER_API
@ -144,7 +145,7 @@ class WeatherSensor(
def icon(self) -> str | None:
"""Return the dynamic icon for battery representation."""
if self.entity_description.key == OUTSIDE_BATTERY:
if self.entity_description.key in BATTERY_LIST:
try:
return battery_level_to_icon(self.native_value)
except Exception:

View File

@ -19,6 +19,8 @@ from .const import (
BARO_PRESSURE,
CH2_HUMIDITY,
CH2_TEMP,
CH2_BATTERY,
INDOOR_BATTERY,
CH3_HUMIDITY,
CH3_TEMP,
CH4_HUMIDITY,
@ -28,8 +30,10 @@ from .const import (
DEW_POINT,
HEAT_INDEX,
HOURLY_RAIN,
INDOOR_BATTERY,
INDOOR_HUMIDITY,
INDOOR_TEMP,
INDOOR_BATTERY,
MONTHLY_RAIN,
OUTSIDE_BATTERY,
OUTSIDE_HUMIDITY,
@ -44,6 +48,7 @@ from .const import (
WIND_SPEED,
YEARLY_RAIN,
UnitOfDir,
WBGT_TEMP,
)
from .sensors_common import WeatherSensorEntityDescription
from .utils import battery_level_to_icon, battery_level_to_text, wind_dir_to_text
@ -127,7 +132,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
WeatherSensorEntityDescription(
key=WIND_DIR,
native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.WIND_DIRECTION,
suggested_display_precision=None,
icon="mdi:sign-direction",
@ -146,7 +151,7 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
key=RAIN,
native_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
state_class=SensorStateClass.TOTAL,
state_class=SensorStateClass.MEASUREMENT,
suggested_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR,
suggested_display_precision=2,
icon="mdi:weather-pouring",
@ -312,4 +317,28 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.ENUM,
value_fn=lambda data: battery_level_to_text(data),
),
WeatherSensorEntityDescription(
key=CH2_BATTERY,
translation_key=CH2_BATTERY,
icon="mdi:battery-unknown",
device_class=SensorDeviceClass.ENUM,
value_fn=lambda data: battery_level_to_text(data),
),
WeatherSensorEntityDescription(
key=INDOOR_BATTERY,
translation_key=INDOOR_BATTERY,
icon="mdi:battery-unknown",
device_class=SensorDeviceClass.ENUM,
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),
),
)

View File

@ -116,6 +116,7 @@
"weekly_rain": { "name": "Týdenní úhrn srážek" },
"monthly_rain": { "name": "Měsíční úhrn srážek" },
"yearly_rain": { "name": "Roční úhrn srážek" },
"wbgt_temp": { "name": "WBGT index" },
"wind_azimut": {
"name": "Azimut",
"state": {
@ -144,6 +145,22 @@
"normal": "Normální",
"unknown": "Neznámá / zcela vybitá"
}
},
"indoor_battery": {
"name": "Stav nabití baterie kozole",
"state": {
"low": "Nízká",
"normal": "Normální",
"unknown": "Neznámá / zcela vybitá"
}
},
"ch2_battery": {
"name": "Stav nabití baterie kanálu 2",
"state": {
"low": "Nízká",
"normal": "Normální",
"unknown": "Neznámá / zcela vybitá"
}
}
}
},

View File

@ -116,6 +116,7 @@
"weekly_rain": { "name": "Weekly precipitation" },
"monthly_rain": { "name": "Monthly precipitation" },
"yearly_rain": { "name": "Yearly precipitation" },
"wbgt_index": { "name": "WBGT index" },
"wind_azimut": {
"name": "Bearing",
"state": {
@ -144,6 +145,22 @@
"low": "Low",
"unknown": "Unknown / drained out"
}
},
"ch2_battery": {
"name": "Channel 2 battery level",
"state": {
"normal": "OK",
"low": "Low",
"unknown": "Unknown / drained out"
}
},
"indoor_battery": {
"name": "Console battery level",
"state": {
"normal": "OK",
"low": "Low",
"unknown": "Unknown / drained out"
}
}
}
},

View File

@ -1,4 +1,6 @@
{
"name": "Sencor SWS 12500 Weather station",
"render_readme": true
"filename": "weather-station.zip",
"render_readme": true,
"zip_release": true
}