Skip to content
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

Home assistant #10

Open
vednolacni opened this issue Apr 16, 2024 · 3 comments
Open

Home assistant #10

vednolacni opened this issue Apr 16, 2024 · 3 comments

Comments

@vednolacni
Copy link

Živjo ma kdo kej od tega uvoženo v home assistant?

@zejn
Copy link
Owner

zejn commented Apr 16, 2024

Za dež in verjetnost toče lahko uporabiš rest plugin. Tole dodaš v configuration.yaml:

rest:
  - resource_template: "https://opendata.si/vreme/report/?lat={{ '{:.2f}'.format(state_attr('zone.home', 'latitude')) }}&lon={{ '{:.2f}'.format(state_attr('zone.home', 'longitude')) }}"
    scan_interval: 180
    sensor:
      - name: "ARSO Dež"
        json_attributes_path: "$.radar"
        value_template: "{{ value_json['radar']['rain_mmph'] }}"
        unit_of_measurement: "mm/h"
        json_attributes:
          - "rain_level"
          - "rain_mmph"
      - name: "ARSO Verjetnost toče"
        json_attributes_path: "$.hailprob"
        value_template: "{{ value_json['hailprob']['hail_level'] }}"
        unit_of_measurement: "%"
        json_attributes:
          - "hail_level"

@zejn
Copy link
Owner

zejn commented Apr 17, 2024

@vednolacni A ti zgornji predlog deluje in reši problem?

@vednolacni
Copy link
Author

Sori šele zdle najdu mal cajta da sprobam, javi mi, da ne more ustvarit teh senzorjem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants