-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Line YAML configuration has moved #38
Labels
bug
Something isn't working
Comments
Hi @bart1604, I changed it to: command_line:
- sensor:
name: Neerslag_Buienalarm_Regen_Data
command: python3 -c "import requests; import json; import random; dataRequest = requests.get('https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=<lat-2-decimals>&lon=<lon-2-decimals>®ion=nl&unit=mm%2Fu&c='+str(random.randint(0,999999999999999)) ).text; dataRequest = dataRequest.replace('\r\n',' '); data = '{\"data\":'+dataRequest+'}'; print(data);"
json_attributes:
- data
value_template: "last_changed: {{states.sensor.neerslag_buienalarm_regen_data.last_changed}}"
scan_interval: 240
- sensor:
name: Neerslag_Buienradar_Regen_Data
command: python3 -c "import requests; import json; import random; dataRequest = requests.get('https://gpsgadget.buienradar.nl/data/raintext?lat=<lat-2-decimals>&lon=<lon-2-decimals>&c='+str(random.randint(0,999999999999999)) ).text; dataRequest = dataRequest.replace('\r\n',' '); data = '{\"data\":\"'+dataRequest+'\"}'; print(data);"
json_attributes:
- data
value_template: "last_changed: {{states.sensor.neerslag_buienradar_regen_data.last_changed}}"
scan_interval: 240
|
Great! will do the same. Thanks for the reply. Now only the installation guide needs to be editted. |
And the other for home zone .
And i did make a pull request for the update to the readme file. |
does this still work in 2024.12? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please fix this:
The text was updated successfully, but these errors were encountered: