Skip to content

Ramzor (Israeli covid19 monitoring system) integration for Home Assistant

Notifications You must be signed in to change notification settings

dubilyer/ramzor_sensor

Repository files navigation

Ramzor ( Israeli COVID19 Monitoring System ) integration.

Original data source is https://corona.health.gov.il/ramzor/

! Attention, please make sure that you didn't miss the configuration step to configure city. Default one is Tel Aviv

Installation:

HACS installation:

  • Open HACS
  • Select "Integrations"
  • Click on three dots, and select "Custom Repositories"
  • Add this GitHub url (https://github.com/dubilyer/ramzor_sensor) and select "Integration" category
  • Click "ADD"
  • Update the configuration.yml

Manual installation

Configuration

  • Find city codes here
  • Add the following config tou your configuration.yml:
    sensor:
        - platform: ramzor_sensor
          cities: 
            - {city_code_1}
            - {city_code_2}
                . . .
            - {city_code_3}
            
    Or just add the platform under the existing sensor tag if you already have one.

As a result you should have a couple of sensors with the following naming convention:

    sensor.grade_{city_code_1}
    sensor.color_{city_code_1}
 

UI representation

I really love the idea of using it with custom:button-card (https://github.com/custom-cards/button-card).

That's an example of the config:

  - type: custom:button-card
    icon: mdi:virus
    name: |
      [[[
        return `<span style="font-size: 3em; color:${states['sensor.color_2640'].state}">${states["sensor.grade_2640"].state}%</span>`;
      ]]]
    styles:
      icon:
        - color: |
            [[[
              return states["sensor.color_2640"].state;
            ]]]

As a result having a percentage info and an icon colored in the corona state color: