The strang thing is that the data does not seem to arrive at WeatherUnderground. I have verified that Home Assistant has the correct data from my Davis Vantage to MQTT integration. The Davis entities are available and correct in home assistant.
I’ve also correctly put in the station ID and key from my WU account.
The automation is running every 5 seconds.
I just found out to put the curl-part in the configuration.yaml and reference the shell_command.curl_get in the automation. I’ve reloaded the yaml-configurations, but it still does not work.
Home Assistant complains that the automation is asking for an unknown service: shell_command.curl_get
A bit more help would be highly appreciated, thanks
The result is that if I run the automation manually, the data is sent to the site, everything works fine. But automation itself does not start. As I understand it, she should get tired every 5 minutes? Or when the value of one of the sensors changes? What am I doing wrong?
A bit late, but did you manage to get this working?
If there is an unknown service, it probably isn’t loaded correctly. A reload of the yaml-configuration only reloads the shell_command configurations one already exists (if i’m correctly). So a Home Assistant restart should resolve the issue.
If a manual run works, there is nothing wrong with the configuration.
The change will happen when one of the trigger_entities change value. You can look in the traces to see what is happening.
Maybe the fix should be to write the trigger_entities as a list, like below.
Thank you very much for your answers. The problem was resolved without my visible participation. I was busy with other things, and when I returned to HA, the data had already begun to arrive on the site. Perhaps I rebooted the HA and that helped, as you said.
Thank you so much for the effort that has gone into this.
I am having an issue, I am not a programmer/coder but can typically work my way through things, but this has got me stumped.
When importing the blueprints and configuring everything to point to my Netatmo devices, then saving the blueprint this all saves to my automations.yaml and creates the folder where your source file exists under blueprints.
I have tried this twice now without luck, trying to debug in HA with the logs is hit and miss I find it fails trying to retrieve the station ID and or key.
WUnderground uploader: Check if station_id and station_key exist: Error executing script. Unexpected error for call_service at pos 1:
During the blueprint import I have tried entering the details directly as in this post example,
station_id: !secret wunderground_station_id
station_key: !secret wunderground_station_key
And in my secrets.yaml file adding wunderground_station_id: “IBRISB534” and wunderground_station_key: “MyWUStationKey” (I have tried the codes in the secrets.yaml with no quotes and single quotes) from the my devices page of WU.
I have also tried import again after cleaning everything out and for the station ID and Key, and get this same message, it shows these details in the trace(s).
Thanks Gavin, I think I tried this, it was the first attempt, but will try again.
I did note that they called secret rather than secrets so also created that file, but still didn’t work.
I have manually added the station and key into the automation.yaml directly and still no joy.
Added it in both automation.yaml and the wunderground_upload.yaml, no joy.
I added the details to only the wunderground_upload.yaml and in the automation.yaml set to ‘’ for both values
And now it seems to be working. Automation completes but at the moment I am not seeing data in wunderground, will wait and see since this weatherstation has been inactive for quite some time.
I have manually added the station and key into the automation.yaml directly and still no joy.
Did you reload the automations after the change?
Is automation running at all? If so, you can create a shell command with the payload from the latest run to test.
How do the automation variables look for the latest automation trace? (please redact the station key)
Yes saved and full restart of homeassistant each time, because I don’t trust reloading just the yaml files.
And yes now that I have manually modified only the wunderground_upload.yaml with my station id and key and the automation does finish to completion, and is auto triggered by change in any values of my devices.
this:
entity_id: automation.wunderground_uploader
state: ‘on’
attributes:
id: ‘1712699992388’
last_triggered: ‘2024-04-11T06:33:17.838839+00:00’
mode: single
current: 0
friendly_name: WUnderground uploader
last_changed: ‘2024-04-11T00:37:27.260014+00:00’
last_updated: ‘2024-04-11T06:33:27.843203+00:00’
context:
id: 01HV5XRYH30YB2J1E2BYTZVMBV
parent_id: null
user_id: null
trigger:
id: ‘0’
idx: ‘0’
alias: null
platform: state
entity_id: >-
sensor.unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_outdoor_temperature
from_state:
entity_id: >-
sensor.unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_outdoor_temperature
state: ‘27.7’
attributes:
state_class: measurement
unit_of_measurement: °C
attribution: Data provided by Netatmo
device_class: temperature
friendly_name: LoungeDetails OurWeather Temperature
last_changed: ‘2024-04-11T06:30:52.740686+00:00’
last_updated: ‘2024-04-11T06:30:52.740686+00:00’
context:
id: 01HV5XM724TM0EG27K74874C06
parent_id: null
user_id: null
to_state:
entity_id: >-
sensor.unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_unknown_70_ee_50_37_0a_18_outdoor_temperature
state: ‘27.5’
attributes:
state_class: measurement
unit_of_measurement: °C
attribution: Data provided by Netatmo
device_class: temperature
friendly_name: LoungeDetails OurWeather Temperature
last_changed: ‘2024-04-11T06:42:52.620744+00:00’
last_updated: ‘2024-04-11T06:42:52.620744+00:00’
context:
id: 01HV5YA62CCZ54ES3KDECJ6B13
parent_id: null
user_id: null
for: null
attribute: null
Maybe I see the problem.
The station_id: ‘’ and station_key: ‘’ indicate these values are empty. The payload also misses this information.
Did you remove this information?
If station_id or station_key misses, the automation won’t run, indicated by ‘no action taken’ in step 2.
If I import your blueprint and fill out all the details including the station ID and key, this will not run past get station id and key.
If I manually put them in the automations.yaml it does not run, just times out on the get station ID and key.
I tried to put them in the secrets.yaml and also created a secret.yaml as per your examples right at the beginning, it will not run just times out at the same point.
If I have these keys in the automation and the wunderground_upload.yaml it still does not run and times out at the get station id and key
The only way I managed to get this to run at all past the get station id and key was to manually put it in the wunderground_upload.yaml in the station id and key, and leave the automations.yaml file as just ‘’ for the id and key. which shows the output above.
I have no idea now what is wrong and am confused because I guess it should just work out of the box by completing the import details?
edit:
also at some point the netatmo integration screwed up the naming of my devices, as you can see from the unkown… stupid long strings, so have removed it and re-added it, and now the names are more meaningful.
Update have re-imported with new tidy Netatmo sensors, and the script times out, I have even tried to use a different wunderground device ID and Key.
Gavin when you say you enter in the automation do you mean the automations.yaml or another you are calling from there? The station ID and Key is it “PWS1234” or ‘PWS1234’ or PWS1234 ? Did you have to make any other changes to the blueprint? I am using the Station key and ID in the automations.yaml without any quotes
The automation runs to a point, collects all the details and creates a string to upload, but times out, if I copy and paste this automation generated url into a browser session it is successful uploading to my PWS.
Let’s start from the beginning. How does your automation look?
The secrets should work, maybe something is misconfigured. See the docs for more details.
The station ID and key are without quotes if I see my automation traces.
that’s what I have in the BluePrint…entered directly into UI and working fine
outside that it’s pretty much exactly as @dvandonkelaar has it in the post above.
(and FWIW @dvandonkelaar I couldn’t get scerets to work for me either…but just moved on, no worries)
Automation.yaml entry as follows. Wind Gust appears down the bottom now because I added this after, because of an issue with the netatmo config disabling it by default when adding to homeassistant, manual enable in entity and all is working fine.
Running this automation manually generates a https upload string that if I copy and paste into browser uploads to wunderground, if you look at my station ID you will see manual runs today, only copying and pasting the generated URL in the automation step details