How to get Accuweather temperature (current, high, low)

I am just now learing that the forecast method has been removed.
I have gone through several threads, I will be honest, I am having a hard time understanding what I actually need to build out now.
I did find a thread where one of our moderators said that if using accuweather, you dont need to do the template, as they are all there.

I started building this out and got it to work, but the temperature for current, low, and high is incorrect.
It was wrong assume cause I was using the following:
realfeel max/min
apparent temperature

These are obviously different. The values I want though are in weather.home as seen in the picture below:

So my question is, how do I pull those three things out so that in my code below it will give me the current temp, what the high of the day will be and low.

Currently using this code:

service: tts.cloud_say
data:
  entity_id: media_player.pool_nest_audio
  message: >-
    Today will be {{states('sensor.home_condition_day_0d')}} with  a High of
    {{states('sensor.home_realfeel_temperature_max_0d')}} and a low of
    {{states('sensor.home_realfeel_temperature_min_0d')}}. Currently it is
    {{states('sensor.home_apparent_temperature')}}. The Pool Water Temperatur is
    {{states('sensor.pool_temp')}}
  options:
    gender: male

Giving this a bump, still needing help.

i’m not sure what you saw about accuweather. you need to do the same get_forecasts call with them as you do with any other weather entity provier for forecasted info. for current temp, it’s in an attirbute on the entity. could you point me to what you saw?

accuweather provides only daily forecasts, not hourly, but the format is still the same for the daily.

to get the current temperature, you fetch the attribute out of your weather entity.

something like

{{ state_attr('weather.home', 'temperature') }}

you could create some sensors by putting something like this in your configuration.yaml

# Accuweather
template:
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home
        response_variable: daily
    sensor:
      - name: temp tomorrow
        unique_id: forecast_temperature
        state: "{{ daily['weather.home'].forecast[0].temperature }}"
        unit_of_measurement: °C
        
      - name: low tomorrow
        unique_id: forecast_templow
        state: "{{ daily['weather.home'].forecast[0].templow }}"
        unit_of_measurement: °C

then you can use {{ states('sensor.forecast_temperature') }} for tomorrow’s temp…

pattern match for the other ones you want.

One of the mods made a comment on this post:

ah. ok. if they are disabled sensor entities, you’d likely find them in the devices tab. like this:

where it says ‘+11 entities not shown’, hit that and see the list of provided but disabled sensors. as i said, i don’t use accuweather so i cant say what sensors they provide. but that’s where such sensors typically are found.

I made some adjustments to your confi.

template:
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home
        response_variable: daily
    sensor:
      - name: TodayHighTemp
        unique_id: forecast_temperature
        state: "{{ daily['weather.home'].forecast[0].temphigh }}"
        unit_of_measurement: °C
        
      - name: TodayLowTemp
        unique_id: forecast_templow
        state: "{{ daily['weather.home'].forecast[0].templow }}"
        unit_of_measurement: °C 

I tried this but got “unkown”
{{states(‘sensor.forecast_temphigh’)}}

I tried this but got “unknown”
{{states(‘sensor.todayhightemp’)}}

Just a quick clarification, all I am looking for is current temp, current forecast for TODAY, including high and low temp.
This runs when I turn my patio light switch on by the pool, telling us what the forecast is for the day and temps :slight_smile:

I have 129 entities in accuweather, none are disabled.

is that code you posted the final modified code you used? if so, you show that you’re trying to use sensor.forecast_temphigh but you’re not creating such a sensor.

the code is still creating forecst_temperature and forecast_templow sensors.

```
unique_id: forecast_temperature
…

unique_id: forecast_templow
```

template:
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home
        response_variable: daily
    sensor:
      - name: TodayHighTemp
        unique_id: forecast_temphigh
        state: "{{ daily['weather.home'].forecast[0].temphigh }}"
        unit_of_measurement: °C
        
      - name: TodayLowTemp
        unique_id: forecast_templow
        state: "{{ daily['weather.home'].forecast[0].templow }}"
        unit_of_measurement: °C  

Made the correct, see above.
Still getting either unavailable or unknown.
using it this way also still unknown:
message: will be {{states(‘sensor.forecast_temphigh’)}}

is it saying unknown? or unavailable? (they’re different!)
it’s triggered to update every hour on the hour

       hours: /1

for testing, maybe switch it to minutes instead of hours and wait till a minute cycles?

btw… the other thing you can do to make sure the call itself works is to go to dev-tools->services and do the get_forecasts call and make sure it is indeed actually fetching data. doing this will help you verify that you are getting the data but just that you need to shove it into the right sensor… here’s an example for my setup:

Afaik the unique_id is not determining what the entity_id will be, the name is. So the entity that was created is should have the entity_id sensor.todayhightemp

1 Like

Yep, that works, so the call service is working.
Interesting about the hour. I figured once I put it into the config file and restarted home assistant it would kick off.
Let me change it to 5 minutes and see what happens.

nope. if you need it to do something on startup, you need to listen to that trigger (see home assistant trigger section):

1 Like

that was it, all working now.
Thanks armedad!!!

glad to hear :slight_smile:
cheers!

whoops. sorry. i think you’re right. i mostly name them the same on my system so spaced. thank you.

I tried to use the code from above to get the forecasted high but in the template tool it says UndefinedError: ‘daily’ is undefined

template:
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home
        response_variable: daily
    sensor:
      - name: TodayHighTemp
        unique_id: forecast_temphigh
        state: "{{ daily['weather.home'].forecast[0].temphigh }}"
        unit_of_measurement: °F
        
      - name: TodayLowTemp
        unique_id: forecast_templow
        state: "{{ daily['weather.home'].forecast[0].templow }}"
        unit_of_measurement: °F

i think you have the names slightly wrong. tempature is the high and templow is the low. Has anyone got the day3, 4, or 5 working? This blelow works for me, but

state: “{{ daily[‘weather.home’].forecast[2].templow }}”, does not?

- name: "Home Temperature Max Today"
  unique_id: home_temperature_max_today
  state: "{{ daily['weather.home'].forecast[0].temperature }}"
  unit_of_measurement: "°F"
- name: "Home Temperature Low Today"
  unique_id: home_temperature_low_today
  state: "{{ daily['weather.home'].forecast[0].templow }}"