I’ve integrated my smarter coffee machine (hurray!) and it has a sensor to tell me the water level. The script to run on the coffee machine checks if there is a enough water. However it doesn’t/can’t check if there’s any fresh coffee in there. I was thinking of creating a manual entity, which I’d use an NFC tag on the machine to toggle to ‘fresh’ when I put coffee in there and the script to make the coffee could toggle to ‘used’ at the end of its run.
Is a binary sensor the correct way to do this ? I have this in sensors.yaml :
binary_sensor:
- platform: template
sensors:
smarter_coffee_grounds_sensor:
friendly_name: "Coffee Grounds"
device_class: occupancy
value_template: "{{ is_state('binary_sensor.0x00158d00044b72dd_occupancy', 'empty') }}"
(The last part taken from the docs - do I need an ‘is not’ state too ?)
Since I’m using the occupancy sensor (closest I could find) can I over ride ‘occupied/clear’ with ‘fresh/used’ ?
Is there a better way to do this ?
Many Thanks