To make all functions of Roode work with home assistant you need to set up a few entities and automations. Roode has endpoints to set the count value, reset the counter to 0 and to recalibrate. Unfourtunately its not possible to expose buttons via ESPHome that do just that.
# This automation script runs when the counter has changed.
# It sets the value slider on the GUI. This slides also had its own automation when the value is changed.
- alias: "Set people32 slider"
trigger:
platform: state
entity_id: sensor.roode32_people_counter_2
action:
service: input_number.set_value
target:
entity_id: input_number.set_people32
data:
value: "{{ states('sensor.roode32_people_counter_2') }}"
- alias: "people32 slider moved"
trigger:
platform: state
entity_id: input_number.set_people32
action:
service: esphome.roode32_set_counter
data:
newCount: "{{ states('input_number.set_people32') | int }}"