Create MQTT components interfaces and documentation

This commit is contained in:
Adrian Jagielak
2025-07-24 15:54:47 +02:00
parent d5cf42899e
commit 1a7ed95c6b
81 changed files with 8675 additions and 178 deletions

View File

@@ -17,15 +17,14 @@ export function fan_ctrl__components(
components: {
[svc.addr]: {
unique_id: svc.addr,
p: "fan",
platform: 'fan',
command_topic: commandTopic,
optimistic: true,
preset_modes: supModes,
preset_mode_command_topic: commandTopic,
preset_mode_state_template: `{{ value_json['${svc.addr}'].mode }}`,
preset_mode_value_template: `{{ value_json['${svc.addr}'].mode }}`,
// Fan is considered "on" if mode is not off/stop
state_value_template: `{{ 'ON' if value_json['${svc.addr}'].mode not in ['off', 'stop'] else 'OFF' }}`,
preset_mode_value_template: `{{ value_json['${svc.addr}'].mode }}`,
},
},