Skip to content

Cannot create Webhook using the yaml code in the documentation #37443

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

Closed
daniel-finger opened this issue Feb 13, 2025 · 3 comments
Closed

Cannot create Webhook using the yaml code in the documentation #37443

daniel-finger opened this issue Feb 13, 2025 · 3 comments
Labels
integration: template Stale The PR had no activity for quite some time, and is marked as Stale

Comments

@daniel-finger
Copy link

Feedback

When trying to use the code in

template:
  - trigger:
      - trigger: webhook
        webhook_id: my-super-secret-webhook-id
    sensor:
      - name: "Webhook Temperature"
        state: "{{ trigger.json.temperature }}"
        unit_of_measurement: °C

      - name: "Webhook Humidity"
        state: "{{ trigger.json.humidity }}"
        unit_of_measurement: %

    binary_sensor:
      - name: "Motion"
        state: "{{ trigger.json.motion }}"
        device_class: motion

it cannot be parsed:

bad indentation of a mapping entry (37:30)

 34 | 
 35 |       - name: "Webhook Humidity"
 36 |         state: "{{ trigger.json.humidity }}"
 37 |         unit_of_measurement: %
-----------------------------------^

I am new to homeassistant, but it seems via GUI I can only set specific helper templates via webhook and not a generic sensor?

URL

https://www.home-assistant.io/integrations/template/

Version

2025.2.3

Additional information

No response

@home-assistant
Copy link

Hey there @PhracturedBlue, @home-assistant/core, mind taking a look at this feedback as it has been labeled with an integration (template) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of template can trigger bot actions by commenting:

  • @home-assistant close Closes the feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign template Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved.
If this issue is still relevant, please let us know by leaving a comment 👍
This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale The PR had no activity for quite some time, and is marked as Stale label Apr 14, 2025
@frenck
Copy link
Member

frenck commented Apr 16, 2025

Oh hi there @daniel-finger 👋

If you are in need of support, you should try our Community Forum or join our Discord chat server.

You are more likely to get the answer you are looking for in those places.

Thanks! 👍

@frenck frenck closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: template Stale The PR had no activity for quite some time, and is marked as Stale
Projects
None yet
Development

No branches or pull requests

2 participants