Skip to content

Home Assistant integration to fetch the closest on-duty pharmacy in Cyprus based on home location.

Notifications You must be signed in to change notification settings

semyonchetvertnyh/ha-cyprus-pharmacy-on-duty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Put GOOGLE_API_KEY into main.go file.
  2. Run make deploy to deploy the bin to Home Assistant.
  3. Configure the integration in Home Assistant:
command_line:
  - sensor:
      name: Closest Pharmacy On-Duty
      unique_id: pharmacy_closest_on_duty
      icon: mdi:medication
      scan_interval: 21600 # Every 6 hours.
      command: >
        /config/packages/pharmacy/on-duty/bin \
          --lat={{ state_attr("zone.home", "latitude") }} \
          --lon={{ state_attr("zone.home", "longitude") }}
      value_template: >
        {% set pharmacy = value | from_json %}
        {{ pharmacy.distance }}
      json_attributes:
        - address
        - instructions
        - google_maps_link
        - phone
        - second_phone
      device_class: distance
      unit_of_measurement: km

About

Home Assistant integration to fetch the closest on-duty pharmacy in Cyprus based on home location.

Resources

Stars

Watchers

Forks

Releases

No releases published