I would like to show something like “countdown timer” in HA dashboard, but have no idea how to do it.
Value should be time difference between current datetime and attribute next_event of scheduler entity value. See picture below:
You need a template sensor with device_class: timestamp. In your configuration.yaml, insert this, making sure you only have one top-level template: section:
Reload template entities (Developer Tools / YAML / Template entities) and you should see the new sensor. When you add that to an Entity or Entities card it will show the time to go, for example “In 3 hours”.