You need to delete the integration for the location and re-add it to get the option to create the new entities.
Ok. I see there is no “Configure” option.
Deleted the integration and re-added, now all my sensor entity id’s have changed.
delete again and maybe restart before readding.
or you can do a bulk rename
Yeah, doing it now. I think I must have changed the base name last time.
Ok fixed. So I should be able to remove the average sensor and all the templates that it feeds now?
tempNext/tempFollowing definitely doesn’t need them.
The problem is that I use these template sensors in a lot of automations. I was thinking it would be easier to change them to use the new entities.
So this:
- name: "bom_today_max"
state: >
{%- if states('sensor.hobart_temp_max_0') == 'unknown' -%}
{{ state_attr('sensor.today_temp_bom', 'max_value') }}
{% else %}
{{ states('sensor.hobart_temp_max_0') }}
{% endif %}
- name: "bom_today_min"
state: >
{%- if states('sensor.hobart_temp_min_0') == 'unknown' -%}
{{ state_attr('sensor.today_temp_bom', 'min_value') }}
{% else %}
{{ states('sensor.hobart_temp_min_0') }}
{% endif %}
To this:
- name: "bom_today_max"
state: "{{ states('sensor.hobart_now_temp_now') }}"
- name: "bom_today_min"
state: "{{ state('sensor.hobart_now_temp_later') }}"
But a global search and replace isn’t too onerous.
you could always just use the same base name as last time
The base name isn’t the issue. I realised what that was and fixed that. It’s the broken average sensor that supplies the daily min and max. I think I can replace it with the new temp_now sensors.
Just realised what I suggested above is wrong.
Think it needs to be:
- name: "bom_today_max"
state: >
{%- if states('sensor.hobart_temp_max_0') == 'unknown' -%}
{{ states('sensor.hobart_now_temp_now') }}
{% else %}
{{ states('sensor.hobart_temp_max_0') }}
{% endif %}
- name: "bom_today_min"
state: >
{%- if states('sensor.hobart_temp_min_0') == 'unknown' -%}
{{ states('sensor.hobart_now_temp_now') }}
{% else %}
{{ states('sensor.hobart_temp_min_0') }}
{% endif %}
it’s kinda different. I switched to statistics for now. no idea if that dev is going to fix it. I’m just looking for the forum post here to ask there as well as the issue
That would be the easiest way, but probably better long term to use that actual entity names in the automations so you are not referencing them. The code server addon makes it really easy to do a global search/replace across your entire config.
I’m still a little unclear on how these new sensors work. Not sure if I nedd this:
- name: "bom_today_max"
state: >
{%- if states('sensor.hobart_temp_max_0') == 'unknown' -%}
{{ states('sensor.hobart_now_temp_now') }}
{% else %}
{{ states('sensor.hobart_temp_max_0') }}
{% endif %}
Or this will do:
- name: "bom_today_max"
state: "{{ states('sensor.hobart_now_temp_now') }}"
If the latter then yeah a global replace is the go.
the max/min still disappear during the day so if you want observed yo need the statistics instead of average to get those
But do the new temp_now sensors disappear?
And to they keep the daily min/max?
hobart_now_temp_now will have either a minimum or maximum value in it. Basically it is the min or max of the next event that is going to occur, so it can contain the todays min (12am-9am), todays max (9am-6pm) and overnight min (ie tomorrows) (6pm-12am).
Ok, so I just have to adjust the template to use the now_temp_now and now_temp_later labels to sort out which is the max and and which is the min forecast.
David, I think this should negate the need for the average or statistics sensor:
- name: "bom_today_max"
state: >
{% if states('sensor.hobart_now_now_label') == 'Max' %}
{{ states('sensor.hobart_now_temp_now') }}
{% else %}
{{ states('sensor.hobart_now_temp_later') }}
{% endif %}
- name: "bom_today_min"
state: >
{% if states('sensor.hobart_now_now_label') == 'Overnight Min' %}
{{ states('sensor.hobart_now_temp_now') }}
{% else %}
{{ states('sensor.hobart_now_temp_later') }}
{% endif %}
EDIT: unless their 9am forecast change time (instead of at midnight) is going to stuff this. Which I think it is…
see if it is still correct after they switch. I’m still trying to get around them now reporting max/min with the statistics average. min/max used to be attributes. Now it seems I need 3 sensors to get that information.
Yeah I’ll give it a go for 24 hours and report back.