eufy-mega / model/device
model/device
The single, concrete Device class.
There are no subclasses. A device's behaviour is entirely determined by its resolved { codec, capabilities, properties } (see resolveDevice). Code asks device.has("light") / device.getProperty("battery") — never instanceof FloodlightCamera.
Live state is held as a flat map of PropertyValue, updated by feeding raw param maps (from the cloud record or P2P notifications) into Device.applyParams. Params the model doesn't recognise are not dropped — they are kept as unknown_<paramType> passthrough, so coverage can grow later without losing data today (the graceful-unknown rule, applied to params).