shenxn / ha-dyson

HomeAssitant custom integration for dyson
MIT License
307 stars 59 forks source link

Dyson TP02 Issue #126

Open heyepic opened 2 years ago

heyepic commented 2 years ago

With the new update, my TB02 tower fan drops off and I have to manually reload the integration. Then, it'll work for a bit then go back to unresponsive. This was not an issue until the new updates. I also have it integrated with Google Home and works without issue so it's definitely fine on Dyson's end I assume. Any help? Thanks!

ghost commented 2 years ago

Yep, I've lost access to one of my Dyson's too (Pure Hot+Cool). My TP-04's are OK. Not sure why one type has dropped off but not the other.

...luckily for me, it is also available in my Apple Home app. HA-Dyson has been working perfectly for months and I was coming to rely on it.

Edit: A full restore to yesterday hasn't solved this.

Edit: It just came back online by itself. Not sure why and not sure if it will last.

Kakise commented 2 years ago

@heyepic @jchhenderson Could I have the logs please ?

Especially yours @jchhenderson, I want to figure out why it came back online by itself

ghost commented 2 years ago

sure - how do I get them for you?

Kakise commented 2 years ago

sure - how do I get them for you?

It's in [HOME_ASSISTANT]:[PORT]/config/logs and then click "load the full logs" and copy/paste the relevant lines

ghost commented 2 years ago

I'm sorry, I lost those logs when I restored to an earlier saved backup whilst trying to overcome the problem.

If this happens again, I'll be sure to copy the logs first.

Kakise commented 2 years ago

I'm sorry, I lost those logs when I restored to an earlier saved backup whilst trying to overcome the problem.

If this happens again, I'll be sure to copy the logs first.

No problem ! Thanks ! :)

heyepic commented 2 years ago

Here you go:

`Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/dyson_local/fan.py:165 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: April 11, 2022, 10:07:04 AM (3 occurrences) Last logged: April 11, 2022, 10:07:43 AM

[140502309536624] Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 258, in async_turn_on await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/dyson_local/fan.py", line 165, in turn_on self._device.turn_on() File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_cool_link.py", line 52, in turn_on self._set_configuration(fmod="FAN") File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 310, in _set_configuration raise DysonNotConnected libdyson.exceptions.DysonNotConnected`

`logger: custom_components.dyson_local Source: helpers/update_coordinator.py:222 Integration: Dyson Local (documentation, issues) First occurred: April 11, 2022, 9:33:04 AM (8 occurrences) Last logged: April 11, 2022, 1:35:34 PM

Error fetching environmental data: Failed to request environmental data`

2022-04-11 09:03:32 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dyson_local which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-04-11 09:03:32 WARNING (SyncWorker_12) [homeassistant.loader] We found a custom integration dyson_cloud which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-04-11 09:04:47 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Office' for dyson_local integration not ready yet: None; Retrying in background 2022-04-11 09:33:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 10:07:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data File "/config/custom_components/dyson_local/fan.py", line 165, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_cool_link.py", line 52, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 310, in _set_configuration raise DysonNotConnected libdyson.exceptions.DysonNotConnected File "/config/custom_components/dyson_local/fan.py", line 165, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_cool_link.py", line 52, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 310, in _set_configuration raise DysonNotConnected libdyson.exceptions.DysonNotConnected File "/config/custom_components/dyson_local/fan.py", line 165, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_cool_link.py", line 52, in turn_on File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 310, in _set_configuration raise DysonNotConnected libdyson.exceptions.DysonNotConnected 2022-04-11 10:44:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 11:40:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 12:04:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 12:47:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 13:05:04 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data 2022-04-11 13:35:34 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data File "/config/custom_components/dyson_local/fan.py", line 120, in set_percentage self._device.set_speed(dyson_speed) File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 353, in set_speed File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_cool_link.py", line 59, in _set_speed File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 310, in _set_configuration raise DysonNotConnected libdyson.exceptions.DysonNotConnected

lone-cloud commented 2 years ago

This is consistent with what I ran into here: https://github.com/shenxn/ha-dyson/issues/103#issuecomment-1098361433 I also have a TP02. The dyson cloud integration is broken and you should disable it after you use it (for dyson_local setup) otherwise it will break your dyson_local integration after a restart.

heyepic commented 2 years ago

@lone-cloud thanks for chiming in. I personally am not running Dyson Cloud Integration, only the local one. It was working fine until this recent update.

lone-cloud commented 2 years ago

@lone-cloud thanks for chiming in. I personally am not running Dyson Cloud Integration, only the local one. It was working fine until this recent update.

The log you pasted above reads that you are in fact running dyson_cloud.

heyepic commented 2 years ago

Yea, that's odd. I disabled that as far as I'm aware. This is what it shows in my integrations screen: image image image

I had both enabled at one time but removed the cloud one.

GitPetri commented 2 years ago

Yea, that's odd. I disabled that as far as I'm aware.

Did you disable or remove the Dyson Cloud? As @lone-cloud mentions above, your logs show that there is something Dyson Cloud in your HA: We found a custom integration dyson_cloud. Looks like it doesn't interfere with anything else but if you want to get rid of it, go to HACS -> Integrations and remove it

heyepic commented 2 years ago

Good call out - I removed it from HACS. Still the same error, TP02 not working even after restarting HA.

lone-cloud commented 2 years ago

In case it helps anyone, I got this integration working great by:

I'm running this integration with a 475 (TP02) and a 527E (hot & cold formaldehyde)

ghost commented 2 years ago

I'm sorry, I lost those logs when I restored to an earlier saved backup whilst trying to overcome the problem. If this happens again, I'll be sure to copy the logs first.

No problem ! Thanks ! :)

Hi - it happened again this morning.

I copied the logs, restarted HA (R-Pi running HA core) and they popped back themselves. There is nothing in the logs that seem to show why, but there is plenty in the logs (for both when the TP-04 was responding and for when it wasn't). Note: I have 2 TP-04's and when one was not responding, the other was still OK. This doesn't appear to be a network issue as I was still able to control the unresponsive-via-HA TP-04 via the Dyson app.

The log issues seem to around float. logs:


2022-04-15 11:31:40 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dyson_local which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-15 11:31:58 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
ghost commented 2 years ago

just happened again.

This time, in addition to the float entires, there is an errors right at the bottom):

edit: should add that I lost the TP-04 after a restart. A 2nd restart brought it back.

2022-04-19 14:36:47 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration anniversaries which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-19 14:36:47 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-19 14:36:47 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dyson_local which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:22 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'sensor.pure_cool_pm_2_5_2' when compiling template '{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
  {{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %} {% if "sensor.pure_cool_pm_2_5_2" |float > 1000 %}
  invalid
{% elif "sensor.pure_cool_pm_2_5_2" |float > 350.5 %} {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 500.0, 401.0, 500.0, 350.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
 {% elif "sensor.pure_cool_pm_2_5_2" |float > 250.5 %}
{{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 400.0, 301.0, 350.4, 250.5) }} {% elif "sensor.pure_cool_pm_2_5_2" |float > 150.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 300.0, 201.0, 250.4, 150.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 55.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 200.0, 151.0, 150.4, 55.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 35.5 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 150.0, 101.0, 55.4, 35.5) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float > 12.1 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 100.0, 51.0, 35.4, 12.1) }}
{% elif "sensor.pure_cool_pm_2_5_2" |float >= 0.0 %}
  {{ calcAQI("sensor.pure_cool_pm_2_5_2" |float, 50.0, 0.0, 12.0, 0.0) }}
{% else %}
  invalid
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-04-19 14:37:33 ERROR (zeroconf-ServiceBrowser-_dyson_mqtt._tcp-_360eye_mqtt._tcp-184051) [custom_components.dyson_local] Failed to connect to device VS7-UK-<removed> at 192.168.1.246