tasmoto and kommode
All checks were successful
ci/woodpecker/tag/build/5 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/build/6 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/5 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
All checks were successful
ci/woodpecker/tag/build/5 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/namespace Pipeline was successful
ci/woodpecker/tag/build/6 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/config Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/5 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
This commit is contained in:
@@ -351,6 +351,36 @@ def _transform_relay_shelly_to_abstract(payload: str) -> dict[str, Any]:
|
||||
"""
|
||||
return {"power": payload.strip()}
|
||||
|
||||
# ============================================================================
|
||||
# HANDLER FUNCTIONS: relay - tasmota technology
|
||||
# ============================================================================
|
||||
|
||||
def _transform_relay_tasmota_to_vendor(payload: dict[str, Any]) -> str:
|
||||
"""Transform abstract relay payload to Tasmota format.
|
||||
|
||||
Tasmota expects plain text 'on' or 'off' (not JSON).
|
||||
- power: 'on'/'off' -> 'on'/'off' (plain string)
|
||||
|
||||
Example:
|
||||
- Abstract: {'power': 'on'}
|
||||
- Tasmota: 'on'
|
||||
"""
|
||||
power = payload.get("power", "off")
|
||||
return power
|
||||
|
||||
|
||||
def _transform_relay_tasmota_to_abstract(payload: str) -> dict[str, Any]:
|
||||
"""Transform Tasmota relay payload to abstract format.
|
||||
|
||||
Tasmota sends plain text 'on' or 'off' (not JSON).
|
||||
- 'on'/'off' -> power: 'on'/'off'
|
||||
|
||||
Example:
|
||||
- Tasmota: 'ON'
|
||||
- Abstract: {'power': 'on'}
|
||||
"""
|
||||
return {"power": payload.strip().lower()}
|
||||
|
||||
# ============================================================================
|
||||
# HANDLER FUNCTIONS: relay - hottis_pv_modbus technology
|
||||
# ============================================================================
|
||||
@@ -581,6 +611,8 @@ TRANSFORM_HANDLERS: dict[tuple[str, str, str], TransformHandler] = {
|
||||
("relay", "shelly", "to_abstract"): _transform_relay_shelly_to_abstract,
|
||||
("relay", "hottis_pv_modbus", "to_vendor"): _transform_relay_hottis_pv_modbus_to_vendor,
|
||||
("relay", "hottis_pv_modbus", "to_abstract"): _transform_relay_hottis_pv_modbus_to_abstract,
|
||||
("relay", "tasmota", "to_vendor"): _transform_relay_tasmota_to_vendor,
|
||||
("relay", "tasmota", "to_abstract"): _transform_relay_tasmota_to_abstract,
|
||||
|
||||
# Three-Phase Powermeter transformations
|
||||
("three_phase_powermeter", "hottis_pv_modbus", "to_vendor"): _transform_three_phase_powermeter_hottis_pv_modbus_to_vendor,
|
||||
|
||||
@@ -794,6 +794,16 @@ devices:
|
||||
topics:
|
||||
state: "zigbee2mqtt/0xbc33acfffe21f547"
|
||||
set: "zigbee2mqtt/0xbc33acfffe21f547/set"
|
||||
- device_id: licht_kommode_schlafzimmer
|
||||
name: Kommode Schlafzimmer
|
||||
type: relay
|
||||
cap_version: "relay@1.0.0"
|
||||
technology: tasmota
|
||||
features:
|
||||
power: true
|
||||
topics:
|
||||
set: "cmnd/tasmota/04/POWER"
|
||||
state: "stat/tasmota/04/POWER"
|
||||
|
||||
- device_id: power_relay_caroutlet
|
||||
name: Car Outlet
|
||||
|
||||
@@ -17,6 +17,10 @@ rooms:
|
||||
title: Medusa-Lampe Schlafzimmer
|
||||
icon: 💡
|
||||
rank: 40
|
||||
- device_id: licht_kommode_schlafzimmer
|
||||
title: Kommode Schlafzimmer
|
||||
icon: 💡
|
||||
rank: 42
|
||||
- device_id: thermostat_schlafzimmer
|
||||
title: Thermostat Schlafzimmer
|
||||
icon: 🌡️
|
||||
|
||||
Reference in New Issue
Block a user