I’m using Frigate to detect a person on my IP camera. The device class comes into HA as “occupancy”. Is there a way to change the device class to “motion” so that the icon will change when it detects motion?
Yes: https://www.home-assistant.io/docs/configuration/customizing-devices/#manual-customization
homeassistant:
customize:
binary_sensor.whatever:
device_class: motion
binary_sensor.another_one:
device_class: motion
If your sensors have cleverly designed entity ids you can use customize_glob
to do this a lot more efficently. e.g.
homeassistant:
customize_glob: # customise all frigate binary occupancy sensors
"binary_sensor.frigate_*_occupancy*":
device_class: motion
This would match on things like:
binary_sensor.frigate_lounge_occupancy
binary_sensor.frigate_bedroom_occupancy
binary_sensor.frigate_outside_occupancy_1
binary_sensor.frigate_outside_occupancy_2
The frigate integration already handles changing the icon based on occupancy on or off
Thanks for the replies. I changed the device class to motion but that didn’t solve my issue. I’m trying to change the icon from the “home” icon to the motion icon that changes based on the entity state . It seems that the icon: mdi:home-outline
is hard coded into the entity. Is there a way to remove that Icon? I don’t specify the icon in the Frigate code.
garage_nw:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
detect:
width: 1920
height: 1080
objects:
track:
- person
# filters:
# motion:
# mask:
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 3