Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: rest
- resource: https://api.ipgeolocation.io/astronomy
- name: Moon API
- scan_interval: 1200
- params:
- apiKey: !secret ipgeolocation_api
- latitude: !secret home_latitude
- longitude: !secret home_longitude
- json_attributes:
- - date
- - current_time
- - moonrise
- - moon_status
- - moon_altitude
- - moon_distance
- - moon_azimuth
- - moon_parallactic_angle
- value_template: >
- {% if value_json.moon_altitude > 0 %}
- up
- {% else %}
- down
- {% endif %}
- icon: >
- {{ state_attr('sensor.moon', 'icon') }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement