events.action: opened
events.author: i00
events.text: <!-- READ THIS FIRST:
    - If you need additional help with this template, please refer to https://www.home-assistant.io/help/reporting_issues/
    - Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
    - Do not report issues for integrations if you are using custom components or integrations.
    - Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
    DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
  -->
  ## The problem
  <!-- 
    Describe the issue you are experiencing here to communicate to the
    maintainers. Tell us what you were trying to do and what happened.
  -->
  Currently a Numeric State has an entity, and value template.
  Entity seems to be required; however it should probably be either a value template or entity required and not both.
  
  The issue I have is that the value template seems to be being ignored altogether and the entity state is being used to trigger < 1 for 5:00 that I have set.
  
  ## Environment
  <!--
    Provide details about the versions you are using, which helps us to reproduce
    and find the issue quicker. Version information is found in the
    Home Assistant frontend: Developer tools -> Info.
  -->
  
  - Home Assistant Core release with the issue: 0.108.1
  - Last working Home Assistant Core release (if known): 
  - Operating environment (Home Assistant/Supervised/Docker/venv): Docker
  - Integration causing this issue: Template
  - Link to integration documentation on our website: https://www.home-assistant.io/integrations/template/
  
  ## Problem-relevant `configuration.yaml`
  <!--
    An example configuration that caused the problem for you. Fill this out even
    if it seems unimportant to you. Please be sure to remove personal information
    like passwords, private URLs and other credentials.
  -->
  
  ```yaml
  N/A
  ```
  
  ## Traceback/Error logs
  <!--
    If you come across any trace or error logs, please provide them.
  -->
  
  ```txt
  N/A
  ```
  
  ## Additional information
events.title: Numeric state Trigger not working with value template correctly
events.type: issue
events.action: created
events.author: pnbruckner
events.text: Please post the YAML code for the trigger. Your description is too vague.
events.type: comment
events.action: created
events.author: i00
events.text: @pnbruckner I can't show you the yaml because it won't let me save it...
  If you set a "Numeric State" trigger, and just fill out a template it complains that you must have entered data into the above or below fields:
  ```
  Message malformed: must contain at least one of below, above. @ data['trigger'][0]
  ```
  It should be that either above, below OR value template are required.
events.type: comment
events.action: created
events.author: pnbruckner
events.text: @i00 I think you misunderstanding what the `value_template` optional config parameter does. Normally the state of the entity is compared to the `above` and/or `below` parameters to determine if the trigger should fire. However, sometimes one wants the trigger to compare some other value to `above`/`below`, e.g., an attribute of the entity. This is where the `value_template` comes in. It determines what value to compare to `above`/`below`, _not_ the above & below values.
  
  If you want to use a template for the above/below values, then what you really want to use is a template trigger.
events.type: comment
events.action: created
events.author: i00
events.text: I don't understand what you mean... with templates if it returns true then it triggers generally ... so if the template evaluates to true shouldn't this cause the trigger to fire without requiring a above / below?
events.type: comment
events.action: created
events.author: pnbruckner
events.text: @i00, no, that's not the purpose of the `value_template` option in the `numeric_state` trigger. As I explained, it's for determining what value should be compared to the `above` and/or `below` parameters. The `value_template` in this case must result in a _numeric value_, not true or false.
  
  Again, if you want a trigger the fires when a template evaluates to `'true'`, then that's the [template trigger](https://www.home-assistant.io/docs/automation/trigger/#template-trigger) that does that.
events.type: comment
events.action: closed
events.author: pnbruckner
events.type: issue
data_with_bots.bot: 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 with the latest updates.
  Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
  This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
data_with_bots.meta: This message directly preceded comment from bot *stale[bot]* by author *pnbruckner*:
data_with_bots.text: Please post the YAML code for the trigger. Your description is too vague.
data_without_bots.meta: This message directly preceded comment from bot *stale[bot]* by author *pnbruckner*:
data_without_bots.text: Please post the YAML code for the trigger. Your description is too vague.