mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
Merge pull request #1085 from mathoudebine/patch-1
Update freebox.py: add missing entries in device_type_map
This commit is contained in:
@@ -66,13 +66,23 @@ device_type_map = {
|
||||
"networking_device": "Router",
|
||||
"multimedia_device": "TV Decoder",
|
||||
"car": "House Appliance",
|
||||
"watch": "Clock",
|
||||
"light": "Domotic",
|
||||
"outlet": "Domotic",
|
||||
"appliances": "House Appliance",
|
||||
"thermostat": "Domotic",
|
||||
"shutter": "Domotic",
|
||||
"other": "(Unknown)",
|
||||
}
|
||||
|
||||
|
||||
def map_device_type(type: str):
|
||||
return device_type_map[type]
|
||||
|
||||
try:
|
||||
return device_type_map[type]
|
||||
except KeyError:
|
||||
# This device type has not been mapped yet
|
||||
mylog("minimal", [f"[{pluginName}] Unknown device type: {type}"])
|
||||
return device_type_map["other"]
|
||||
|
||||
async def get_device_data(api_version: int, api_address: str, api_port: int):
|
||||
# ensure existence of db path
|
||||
|
||||
Reference in New Issue
Block a user