Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml error on MQTT fan command_template #3311

Open
jbperrin88 opened this issue Dec 1, 2024 · 2 comments
Open

Yaml error on MQTT fan command_template #3311

jbperrin88 opened this issue Dec 1, 2024 · 2 comments
Labels

Comments

@jbperrin88
Copy link

jbperrin88 commented Dec 1, 2024

Hi there,

First off all , thanks for this amazing piece of software .

I'm trying to create mqtt fan device / entity but i've an yaml error on 'command_template'

image

I can't use 'payload_on' and 'payload_off' cause my mqtt except a json. So i really need to use template.

mqtt:
  fan:
    - name: "Ventilateur Hall"
      device:
        name:  "Ventilateur Hall"
        manufacturer: delta PLC
        identifiers: delta_plc_fan_hall
      unique_id: delta_plc_fan_hall
      state_topic: "hnb/plc/fan/status/all"
      state_value_template: >
        {{ iif( value_json.d.state[0] == 0, 'off' , 'on' ) }}
      command_topic: "none"
      command_topic: "hnb/plc/fan/on_off/all"
      command_template: ""

image

Can you please update the schemas ?

I've read this closed issue: #2987
I've the same behaviour and I don't really understand the documentation to update the schema by myself .

Best regards

@jbperrin88
Copy link
Author

jbperrin88 commented Dec 1, 2024

Same for all direction information:

mqtt:
  fan:
    - name: "Bedroom Fan"
      command_topic: "bedroom_fan/on/set"
      direction_state_topic: ""
      direction_value_template:  "{{ iif(value == 'forward', 'fwd', 'rev') }}"
      direction_command_topic: ""
      direction_command_template:   "{{ iif(value == 'fwd', 'forward', 'reverse') }}"

image

@jbperrin88
Copy link
Author

aa7d751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant