Closed alex-bristol closed 2 years ago
I not following the suggestion you are trying to make? Could you try explaining it differently?
Hello Franck,
Many thanks for the marvellous Home Assistant software you are helping to create.
I am not sure if HA can even do what I am asking for, so hence why I am reading Help Docs.
The documentation shows:
"
condition: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature above: input_number.temperature_threshold_low below: input_number.temperature_threshold_high
"
Please can we have an example like this, if HA can do it:
"
condition:
condition: numeric_state
entity_id: climate.living_room_thermostat
attribute: temperature
above:
"
All the Help Docs show hardcoded numbers in "above:" and "below:" field. Entering hardcoded numbers is very easy, and needs no explaining and just one example is fine, rather than the multiple examples as shown. Where users like myself need more help around working with variables and calculated numbers in the "above:" and "below:", just like the input_number example. Please show other ways of entering variables into "above:" and "below:".
The whole limitation of the condition examples in Help Docs is it only works with one attribute (variable), real world solutions normally need to work with multiple attributes (variables) to compare against and decide whether action needs taking.
Cheers, Alex
My original request: Feedback
Any chance we could have a great and very realistic example following this example listed:
condition: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature above: input_number.temperature_threshold_low below: input_number.temperature_threshold_high
From the Numeric State Condition section.
The current temperature compared with the setpoint temperature (the temperature the user has set on the device). Examples where this would be used: freezer, fridge, radiator thermostat, air conditioner, boiler, electric fire; they all would have both temperatures. I am trying to workout when an HA condition section with a radiator thermostat needs to turn on/off the boiler, the "above" and "below" value could change any time by the user on the device, and all the examples given are hardcode numbers or an HA input_number, nothing from the device. Thanks.
URL
https://www.home-assistant.io/docs/scripts/conditions/
Version
2022.5.3
Additional information
No response
From: Franck Nijhof @.> Sent: 12 May 2022 09:37 To: home-assistant/home-assistant.io @.> Cc: Padg @.>; Author @.> Subject: Re: [home-assistant/home-assistant.io] A Great Example To Add To Docs (Issue #22715)
I not following the suggestion you are trying to make? Could you try explaining it differently?
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/home-assistant.io/issues/22715#issuecomment-1124694154, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFRWRHTKIVEN4RASN2G6433VJS7NTANCNFSM5VWMAG4Q. You are receiving this because you authored the thread.Message ID: @.***>
above
and below
can use other entities providing a number. The example uses a input_number
entity, because that is the common use case, but any other entity providing a numeric value can be used.
Which is also states in the documentation:
Number helpers (input_number entities), number and sensor entities that contain a numeric value, can be used in the above and below options to make the condition more dynamic.
I'm not sure what is not clear about that?
Thanks for your note Franck.
I think I am probably misunderstanding something, these were the things I was trying yesterday and the reason to view the Help Docs, looking for examples that use sensor with multiple entities:
condition: numeric_state entity_id: climate.devolo_thermostat_09356_5 attribute: current_temperature
value_template: "{{ {% set settemp = float(state_attr('climate.devolo_thermostat_09356_5', 'temperature')) %}
below: {% settemp %} }}"
condition: numeric_state entity_id: climate.devolo_thermostat_09356_5 attribute: temperature below: {% float(state_attr('climate.devolo_thermostat_09356_5', 'temperature')) %}
Where attribute: "temperature" is the temperature the user has set on the hardware.
But clearly I am not understanding something fundamental about HA, I just kept getting errors from HA. Rather than take up more of your very valuable time best I post this on to the HA community website for help, leave with me with this but thanks again for your understanding.
I just realised you are "Frenck", you are doing a massive wonderful job, with all the HA and GitHub stuff - THANK YOU SO MUCH. You are helping make the world a MUCH, MUCH better place, helping many people like me use energy very efficiently, and therefore helping save the planet's precious resources. We can now build near perfect heating systems. You give us the power to create automations that can't be done via any other software. I have waited so many years for something as powerful as HA.
Many, many thanks Frenck.
Kind regards, Alex from Bristol UK
From: Franck Nijhof @.> Sent: 12 May 2022 10:52 To: home-assistant/home-assistant.io @.> Cc: Padg @.>; Author @.> Subject: Re: [home-assistant/home-assistant.io] A Great Example To Add To Docs (Issue #22715)
above and below can use other entities providing a number. The example uses a input_number entity, because that is the common use case, but any other entity providing a numeric value can be used.
Which is also states in the documentation:
Number helpers (input_number entities), number and sensor entities that contain a numeric value, can be used in the above and below options to make the condition more dynamic.
I'm not sure what is not clear about that?
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/home-assistant.io/issues/22715#issuecomment-1124788743, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFRWRHSAMQYIF47V3TF6JXLVJTIFXANCNFSM5VWMAG4Q. You are receiving this because you authored the thread.Message ID: @.***>
Hi Fanch,
I have now worked out the correct syntax with comparing two entities, this was the sort of example was I looking for help with in the Help Docs:
"condition: numeric_state entity_id: climate.devolo_thermostat_09356_4 attribute: temperature above: sensor.devolo_thermostat_09356_air_temperature_4"
An example where the "above" field is filled out with a none hardcoded number or input_number. As we can see below the docs do not show an example with entity in "above" or "below", and as a beginner with HA this example would of been very helpful to me, please remember as a beginner we are still trying to understand what an entity is, and more importantly how to write the correct syntax so HA understands:
Numeric state condition
This type of condition attempts to parse the state of the specified entity or the attribute of an entity as a number, and triggers if the value matches the thresholds.
If both below and above are specified, both tests have to pass.
condition: alias: "Temperature between 17 and 25 degrees" condition: numeric_state entity_id: sensor.temperature above: 17 below: 25
YAML Copy
You can optionally use a value_template to process the value of the state before testing it.
condition: condition: numeric_state entity_id: sensor.temperature above: 17 below: 25
value_template: "{{ float(state.state) + 2 }}"
YAML Copy
It is also possible to test the condition against multiple entities at once. The condition will pass if all entities match the thresholds.
condition: condition: numeric_state entity_id:
YAML Copy
Alternatively, the condition can test against a state attribute. The condition will pass if the attribute value of the entity matches the thresholds.
condition: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature above: 17 below: 25
YAML Copy
Number helpers (input_number entities), number and sensor entities that contain a numeric value, can be used in the above and below options to make the condition more dynamic.
condition: condition: numeric_state entity_id: climate.living_room_thermostat attribute: temperature above: input_number.temperature_threshold_low below: input_number.temperature_threshold_high
YAML Cop
Kind regards, Alex
From: Alex Bristol @.> Sent: 12 May 2022 12:04 To: home-assistant/home-assistant.io @.> Subject: Re: [home-assistant/home-assistant.io] A Great Example To Add To Docs (Issue #22715)
Thanks for your note Franck.
I think I am probably misunderstanding something, these were the things I was trying yesterday and the reason to view the Help Docs, looking for examples that use sensor with multiple entities:
condition: numeric_state entity_id: climate.devolo_thermostat_09356_5 attribute: current_temperature
value_template: "{{ {% set settemp = float(state_attr('climate.devolo_thermostat_09356_5', 'temperature')) %}
below: {% settemp %} }}"
condition: numeric_state entity_id: climate.devolo_thermostat_09356_5 attribute: temperature below: {% float(state_attr('climate.devolo_thermostat_09356_5', 'temperature')) %}
Where attribute: "temperature" is the temperature the user has set on the hardware.
But clearly I am not understanding something fundamental about HA, I just kept getting errors from HA. Rather than take up more of your very valuable time best I post this on to the HA community website for help, leave with me with this but thanks again for your understanding.
I just realised you are "Frenck", you are doing a massive wonderful job, with all the HA and GitHub stuff - THANK YOU SO MUCH. You are helping make the world a MUCH, MUCH better place, helping many people like me use energy very efficiently, and therefore helping save the planet's precious resources. We can now build near perfect heating systems. You give us the power to create automations that can't be done via any other software. I have waited so many years for something as powerful as HA.
Many, many thanks Frenck.
Kind regards, Alex from Bristol UK
From: Franck Nijhof @.> Sent: 12 May 2022 10:52 To: home-assistant/home-assistant.io @.> Cc: Padg @.>; Author @.> Subject: Re: [home-assistant/home-assistant.io] A Great Example To Add To Docs (Issue #22715)
above and below can use other entities providing a number. The example uses a input_number entity, because that is the common use case, but any other entity providing a numeric value can be used.
Which is also states in the documentation:
Number helpers (input_number entities), number and sensor entities that contain a numeric value, can be used in the above and below options to make the condition more dynamic.
I'm not sure what is not clear about that?
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/home-assistant.io/issues/22715#issuecomment-1124788743, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFRWRHSAMQYIF47V3TF6JXLVJTIFXANCNFSM5VWMAG4Q. You are receiving this because you authored the thread.Message ID: @.***>
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.
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.
Feedback
Any chance we could have a great and very realistic example following this example listed:
From the Numeric State Condition section.
The current temperature compared with the setpoint temperature (the temperature the user has set on the device). Examples where this would be used: freezer, fridge, radiator thermostat, air conditioner, boiler, electric fire; they all would have both temperatures. I am trying to workout when an HA condition section with a radiator thermostat needs to turn on/off the boiler, the "above" and "below" value could change any time by the user on the device, and all the examples given are hardcode numbers or an HA input_number, nothing from the device. Thanks.
URL
https://www.home-assistant.io/docs/scripts/conditions/
Version
2022.5.3
Additional information
No response