Manually refresh rest sensor?


is it possible to manually trigger a refresh of a restful sensor? According to the docs, there is no command for rest sensors. Only rest.refresh what I guess is to reload the configuration.

Background is: I have a template switch which is based on a rest sensor. If you toggle the switch, the command is sent. But the switch still shows the old state, until the next refresh of the rest sensor. This is confusing…

Add the following service to your template switch turn_on and turn_off actions:

- service: homeassistant.update_entity
  entity_id: sensor.your_rest_sensor

1 Like