1. File bank_gov_ua_sensors.yaml:
#https://bank.gov.ua/ua/open-data/api-dev
bank_gov_ua_sensors:
  
  sensor:
  - platform: rest
    name: bank_gov_ua_eur
    resource_template: https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=EUR&json&date={{ now().strftime("%Y%m%d") }}
    method: GET
    headers:
      content-type: 'application/json'
    value_template: "{{ value_json[0].rate }}"
    json_attributes:
      - "''"
    scan_interval: 3600 # 1 Hour

  - platform: rest
    name: bank_gov_ua_usd
    resource_template: https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=USD&json&date={{ now().strftime("%Y%m%d") }}
    method: GET
    headers:
      content-type: 'application/json'
    value_template: "{{ value_json[0].rate }}"
    json_attributes:
      - "''"
    scan_interval: 3600 # 1 Hour

2. File automations.yaml:
- id: '1703259398273'
  alias: 'AWTRIX: USD and EURO currency rates'
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /4
  condition: []
  action:
  - service: mqtt.publish
    data:
      qos: '0'
      retain: false
      topic: awtrix_565c3c/custom/rateusd
      payload: '{           "text": "{{ states(''sensor.bank_gov_ua_usd'') | round(3)
        }}",           "icon": "11388",           "repeat": 2,           "duration":
        5         }'
  - service: mqtt.publish
    data:
      qos: '0'
      retain: false
      topic: awtrix_565c3c/custom/rateeur
      payload: '{           "text": "{{ states(''sensor.bank_gov_ua_eur'') | round(3)
        }}",           "icon": "2147",           "repeat": 2,           "duration":
        5         }'
  mode: single