Platform: homeassistant and binary_sensor errors?

In my msp2807 led display, I have this code to pull from a HomeAssistant:

sensor:
  - platform: homeassistant
    entity_id: sensor.motorhome_hlsr10_bat_veh_voltage
    id: veh_volts
    on_value: 
      then:
        - logger.log: "mpr says: veh volts has changed"

  - platform: homeassistant
    entity_id: binary_sensor.esp32_s3_zero_waste
    id: waste_valve
    on_value: 
      then:
        - logger.log: "mpr says: waste value has changed"

The first value veh_volts comes across ok but the binary waste_valve does not. Throwing the error " Can't convert 'off' to number!:

[20:29:18][D][homeassistant.sensor:024]: 'sensor.motorhome_hlsr10_bat_veh_voltage': Got state 13.20
[20:29:18][D][sensor:094]: 'veh_volts': Sending state 13.20000  with 1 decimals of accuracy
[20:29:18][D][main:2561]: mpr says: veh volts has changed
[20:29:28][D][homeassistant.sensor:024]: 'sensor.motorhome_hlsr10_bat_veh_voltage': Got state 13.17
[20:29:28][D][sensor:094]: 'veh_volts': Sending state 13.17000  with 1 decimals of accuracy
[20:29:28][D][main:2561]: mpr says: veh volts has changed
[20:29:38][D][homeassistant.sensor:024]: 'sensor.motorhome_hlsr10_bat_veh_voltage': Got state 13.15
[20:29:38][D][sensor:094]: 'veh_volts': Sending state 13.15000  with 1 decimals of accuracy
[20:29:38][D][main:2561]: mpr says: veh volts has changed
[20:29:41][W][homeassistant.sensor:015]: 'binary_sensor.esp32_s3_zero_waste': Can't convert 'off' to number!
[20:29:41][D][sensor:094]: 'waste_valve': Sending state nan  with 1 decimals of accuracy
[20:29:41][D][main:2597]: mpr says: waste value has changed
[20:29:43][W][homeassistant.sensor:015]: 'binary_sensor.esp32_s3_zero_waste': Can't convert 'on' to number!
[20:29:43][D][sensor:094]: 'waste_valve': Sending state nan  with 1 decimals of accuracy
[20:29:43][D][main:2597]: mpr says: waste value has changed
[20:29:48][D][homeassistant.sensor:024]: 'sensor.motorhome_hlsr10_bat_veh_voltage': Got state 13.14
[20:29:48][D][sensor:094]: 'veh_volts': Sending state 13.14000  with 1 decimals of accuracy
[20:29:48][D][main:2561]: mpr says: veh volts has changed
[20:29:58][D][homeassistant.sensor:024]: 'sensor.motorhome_hlsr10_bat_veh_voltage': Got state 13.13
[20:29:58][D][sensor:094]: 'veh_volts': Sending state 13.13000  with 1 decimals of accuracy
[20:29:58][D][main:2561]: mpr says: veh volts has changed

Any help/suggestions to debug will be most welcome.

Regards, Martin

Since that second one is a binary sensor in Home Assistant, I suspect it needs to be a binary sensor in ESPHome as well (instead of a sensor as you have it now).