'device_tracker' for Zigbee, 433Mhz and other sensors

Hello there!

I was wondering if someone could point me in the right direction. Has anyone managed to setup/create a method of ‘device_tracker’ for sensors such as Zigbee and 433Mhz sensors?

I’ve got so far in regards to creating a sensor template to check on when a devices last state change was and then thinking of setting up some sort of rule to check if the device has changed state within a certain time period.

Example of Sensor Template:
platform: template sensors: last_ground_hallway_motion_time:
entity_id: binary_sensor.ground_hallway_motion
friendly_name: “Last Ground Hallway Motion”
value_template: “{{as_timestamp(states.binary_sensor.ground_hallway_motion.last_changed) | timestamp_custom(’%A %d-%b-%y, %H:%M:%S’)}}”

Anyone know how I would go about the second part to check if a device has changed within a certain time? For example:

Has ‘binary_sensor.ground_hallway_motion’ triggered in the past 8 hours? If so, set status to ‘Online’. If not, ‘Offline’. Make sense?