Bump pyatmo to 7.3.0 (#81290)

* Bump pyatmo to 7.3.0

* Update test fixture data and tests
This commit is contained in:
Tobias Sauerwein 2022-10-31 11:09:15 +01:00 committed by GitHub
parent ae2419b569
commit 927b8b2eef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 381 additions and 878 deletions

View file

@ -3,7 +3,7 @@
"name": "Netatmo",
"integration_type": "hub",
"documentation": "https://www.home-assistant.io/integrations/netatmo",
"requirements": ["pyatmo==7.2.0"],
"requirements": ["pyatmo==7.3.0"],
"after_dependencies": ["cloud", "media_source"],
"dependencies": ["application_credentials", "webhook"],
"codeowners": ["@cgtobi"],

View file

@ -1445,7 +1445,7 @@ pyalmond==0.0.2
pyatag==0.3.5.3
# homeassistant.components.netatmo
pyatmo==7.2.0
pyatmo==7.3.0
# homeassistant.components.atome
pyatome==0.1.1

View file

@ -1033,7 +1033,7 @@ pyalmond==0.0.2
pyatag==0.3.5.3
# homeassistant.components.netatmo
pyatmo==7.2.0
pyatmo==7.3.0
# homeassistant.components.apple_tv
pyatv==0.10.3

View file

@ -114,7 +114,7 @@
"battery_percent": 79
},
{
"_id": "12:34:56:03:1b:e4",
"_id": "12:34:56:03:1b:e5",
"type": "NAModule2",
"module_name": "Garden",
"data_type": ["Wind"],
@ -430,63 +430,203 @@
"modules": []
},
{
"_id": "12:34:56:58:c8:54",
"date_setup": 1605594014,
"last_setup": 1605594014,
"_id": "12:34:56:80:bb:26",
"station_name": "MYHOME (Palier)",
"date_setup": 1558709904,
"last_setup": 1558709904,
"type": "NAMain",
"last_status_store": 1605878352,
"firmware": 178,
"wifi_status": 47,
"last_status_store": 1644582700,
"module_name": "Palier",
"firmware": 181,
"last_upgrade": 1558709906,
"wifi_status": 57,
"reachable": true,
"co2_calibrating": false,
"data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"],
"place": {
"altitude": 65,
"city": "Njurunda District",
"country": "SE",
"timezone": "Europe/Stockholm",
"location": [17.123456, 62.123456]
"altitude": 329,
"city": "Someplace",
"country": "FR",
"timezone": "Europe/Paris",
"location": [6.1234567, 46.123456]
},
"station_name": "Njurunda (Indoor)",
"home_id": "5fb36b9ec68fd10c6467ca65",
"home_name": "Njurunda",
"home_id": "91763b24c43d3e344f424e8b",
"home_name": "MYHOME",
"dashboard_data": {
"time_utc": 1605878349,
"Temperature": 19.7,
"CO2": 993,
"Humidity": 40,
"Noise": 40,
"Pressure": 1015.6,
"AbsolutePressure": 1007.8,
"min_temp": 19.7,
"max_temp": 20.4,
"date_max_temp": 1605826917,
"date_min_temp": 1605873207,
"time_utc": 1644582694,
"Temperature": 21.1,
"CO2": 1339,
"Humidity": 45,
"Noise": 35,
"Pressure": 1026.8,
"AbsolutePressure": 974.5,
"min_temp": 21,
"max_temp": 21.8,
"date_max_temp": 1644534255,
"date_min_temp": 1644550420,
"temp_trend": "stable",
"pressure_trend": "up"
},
"modules": [
{
"_id": "12:34:56:58:e6:38",
"_id": "12:34:56:80:1c:42",
"type": "NAModule1",
"last_setup": 1605594034,
"module_name": "Outdoor",
"last_setup": 1558709954,
"data_type": ["Temperature", "Humidity"],
"battery_percent": 100,
"battery_percent": 27,
"reachable": true,
"firmware": 50,
"last_message": 1605878347,
"last_seen": 1605878328,
"rf_status": 62,
"battery_vp": 6198,
"last_message": 1644582699,
"last_seen": 1644582699,
"rf_status": 68,
"battery_vp": 4678,
"dashboard_data": {
"time_utc": 1605878328,
"Temperature": 0.6,
"Humidity": 77,
"min_temp": -2.1,
"max_temp": 1.5,
"date_max_temp": 1605865920,
"date_min_temp": 1605826904,
"temp_trend": "down"
"time_utc": 1644582648,
"Temperature": 9.4,
"Humidity": 57,
"min_temp": 6.7,
"max_temp": 9.8,
"date_max_temp": 1644534223,
"date_min_temp": 1644569369,
"temp_trend": "up"
}
},
{
"_id": "12:34:56:80:c1:ea",
"type": "NAModule3",
"module_name": "Rain",
"last_setup": 1563734531,
"data_type": ["Rain"],
"battery_percent": 21,
"reachable": true,
"firmware": 12,
"last_message": 1644582699,
"last_seen": 1644582699,
"rf_status": 79,
"battery_vp": 4256,
"dashboard_data": {
"time_utc": 1644582686,
"Rain": 3.7,
"sum_rain_1": 0,
"sum_rain_24": 6.9
}
},
{
"_id": "12:34:56:80:44:92",
"type": "NAModule4",
"module_name": "Bedroom",
"last_setup": 1575915890,
"data_type": ["Temperature", "CO2", "Humidity"],
"battery_percent": 28,
"reachable": true,
"firmware": 51,
"last_message": 1644582699,
"last_seen": 1644582654,
"rf_status": 67,
"battery_vp": 4695,
"dashboard_data": {
"time_utc": 1644582654,
"Temperature": 19.3,
"CO2": 1076,
"Humidity": 53,
"min_temp": 19.2,
"max_temp": 19.7,
"date_max_temp": 1644534243,
"date_min_temp": 1644553418,
"temp_trend": "stable"
}
},
{
"_id": "12:34:56:80:7e:18",
"type": "NAModule4",
"module_name": "Bathroom",
"last_setup": 1575915955,
"data_type": ["Temperature", "CO2", "Humidity"],
"battery_percent": 55,
"reachable": true,
"firmware": 51,
"last_message": 1644582699,
"last_seen": 1644582654,
"rf_status": 59,
"battery_vp": 5184,
"dashboard_data": {
"time_utc": 1644582654,
"Temperature": 19.4,
"CO2": 1930,
"Humidity": 55,
"min_temp": 19.4,
"max_temp": 21.8,
"date_max_temp": 1644534224,
"date_min_temp": 1644582039,
"temp_trend": "stable"
}
},
{
"_id": "12:34:56:03:1b:e4",
"type": "NAModule2",
"module_name": "Garden",
"data_type": ["Wind"],
"last_setup": 1549193862,
"reachable": true,
"dashboard_data": {
"time_utc": 1559413170,
"WindStrength": 4,
"WindAngle": 217,
"GustStrength": 9,
"GustAngle": 206,
"max_wind_str": 21,
"max_wind_angle": 217,
"date_max_wind_str": 1559386669
},
"firmware": 19,
"last_message": 1559413177,
"last_seen": 1559413177,
"rf_status": 59,
"battery_vp": 5689,
"battery_percent": 85
}
]
},
{
"_id": "00:11:22:2c:be:c8",
"station_name": "Zuhause (Kinderzimmer)",
"type": "NAMain",
"last_status_store": 1649146022,
"reachable": true,
"favorite": true,
"data_type": ["Pressure"],
"place": {
"altitude": 127,
"city": "Wiesbaden",
"country": "DE",
"timezone": "Europe/Berlin",
"location": [8.238054275512695, 50.07585525512695]
},
"read_only": true,
"dashboard_data": {
"time_utc": 1649146022,
"Pressure": 1015.6,
"AbsolutePressure": 1000.4,
"pressure_trend": "stable"
},
"modules": [
{
"_id": "00:11:22:2c:ce:b6",
"type": "NAModule1",
"data_type": ["Temperature", "Humidity"],
"reachable": true,
"last_message": 1649146022,
"last_seen": 1649145996,
"dashboard_data": {
"time_utc": 1649145996,
"Temperature": 7.8,
"Humidity": 87,
"min_temp": 6.5,
"max_temp": 7.8,
"date_max_temp": 1649145996,
"date_min_temp": 1649118465,
"temp_trend": "up"
}
}
]

View file

@ -23,7 +23,6 @@
"12:34:56:00:f1:62",
"12:34:56:10:f1:66",
"12:34:56:00:e3:9b",
"12:34:56:00:86:99",
"0009999992"
]
},
@ -39,12 +38,6 @@
"type": "kitchen",
"module_ids": ["12:34:56:03:a0:ac"]
},
{
"id": "2940411588",
"name": "Child",
"type": "custom",
"module_ids": ["12:34:56:26:cc:01"]
},
{
"id": "222452125",
"name": "Bureau",
@ -76,6 +69,12 @@
"name": "Corridor",
"type": "corridor",
"module_ids": ["10:20:30:bd:b8:1e"]
},
{
"id": "100007520",
"name": "Toilettes",
"type": "toilets",
"module_ids": ["00:11:22:33:00:11:45:fe"]
}
],
"modules": [
@ -120,15 +119,29 @@
"name": "Hall",
"setup_date": 1544828430,
"room_id": "3688132631",
"reachable": true,
"modules_bridged": ["12:34:56:00:86:99", "12:34:56:00:e3:9b"]
},
{
"id": "12:34:56:00:a5:a4",
"id": "12:34:56:10:f1:66",
"type": "NDB",
"name": "Netatmo-Doorbell",
"setup_date": 1602691361,
"room_id": "3688132631",
"reachable": true,
"hk_device_id": "123456007df1",
"customer_id": "1000010",
"network_lock": false,
"quick_display_zone": 62
},
{
"id": "12:34:56:10:b9:0e",
"type": "NOC",
"name": "Garden",
"setup_date": 1544828430,
"reachable": true
"name": "Front",
"setup_date": 1509290599,
"reachable": true,
"customer_id": "A00010",
"network_lock": false,
"use_pincode": false
},
{
"id": "12:34:56:20:f5:44",
@ -155,33 +168,6 @@
"room_id": "222452125",
"bridge": "12:34:56:20:f5:44"
},
{
"id": "12:34:56:10:f1:66",
"type": "NDB",
"name": "Netatmo-Doorbell",
"setup_date": 1602691361,
"room_id": "3688132631",
"reachable": true,
"hk_device_id": "123456007df1",
"customer_id": "1000010",
"network_lock": false,
"quick_display_zone": 62
},
{
"id": "12:34:56:00:e3:9b",
"type": "NIS",
"setup_date": 1620479901,
"bridge": "12:34:56:00:f1:62",
"name": "Sirene in hall"
},
{
"id": "12:34:56:00:86:99",
"type": "NACamDoorTag",
"name": "Window Hall",
"setup_date": 1581177375,
"bridge": "12:34:56:00:f1:62",
"category": "window"
},
{
"id": "12:34:56:30:d5:d4",
"type": "NBG",
@ -199,16 +185,17 @@
"bridge": "12:34:56:30:d5:d4"
},
{
"id": "12:34:56:37:11:ca",
"id": "12:34:56:80:bb:26",
"type": "NAMain",
"name": "NetatmoIndoor",
"name": "Villa",
"setup_date": 1419453350,
"room_id": "4122897288",
"reachable": true,
"modules_bridged": [
"12:34:56:07:bb:3e",
"12:34:56:03:1b:e4",
"12:34:56:36:fc:de",
"12:34:56:05:51:20"
"12:34:56:80:44:92",
"12:34:56:80:7e:18",
"12:34:56:80:1c:42",
"12:34:56:80:c1:ea"
],
"customer_id": "C00016",
"hardware_version": 251,
@ -271,48 +258,46 @@
"module_offset": {
"12:34:56:80:bb:26": {
"a": 0.1
},
"03:00:00:03:1b:0e": {
"a": 0
}
}
},
{
"id": "12:34:56:36:fc:de",
"id": "12:34:56:80:1c:42",
"type": "NAModule1",
"name": "Outdoor",
"setup_date": 1448565785,
"bridge": "12:34:56:37:11:ca"
"bridge": "12:34:56:80:bb:26"
},
{
"id": "12:34:56:80:c1:ea",
"type": "NAModule3",
"name": "Rain",
"setup_date": 1591770206,
"bridge": "12:34:56:80:bb:26"
},
{
"id": "12:34:56:80:44:92",
"type": "NAModule4",
"name": "Bedroom",
"setup_date": 1484997703,
"bridge": "12:34:56:80:bb:26"
},
{
"id": "12:34:56:80:7e:18",
"type": "NAModule4",
"name": "Bathroom",
"setup_date": 1543579864,
"bridge": "12:34:56:80:bb:26"
},
{
"id": "12:34:56:03:1b:e4",
"type": "NAModule2",
"name": "Garden",
"setup_date": 1543579864,
"bridge": "12:34:56:37:11:ca"
},
{
"id": "12:34:56:05:51:20",
"type": "NAModule3",
"name": "Rain",
"setup_date": 1591770206,
"bridge": "12:34:56:37:11:ca"
},
{
"id": "12:34:56:07:bb:3e",
"type": "NAModule4",
"name": "Bedroom",
"setup_date": 1484997703,
"bridge": "12:34:56:37:11:ca"
},
{
"id": "12:34:56:26:68:92",
"type": "NHC",
"name": "Indoor",
"setup_date": 1571342643
},
{
"id": "12:34:56:26:cc:01",
"type": "BNS",
"name": "Child",
"setup_date": 1571634243
"bridge": "12:34:56:80:bb:26"
},
{
"id": "12:34:56:80:60:40",
@ -324,7 +309,8 @@
"12:34:56:80:00:12:ac:f2",
"12:34:56:80:00:c3:69:3c",
"12:34:56:00:00:a1:4c:da",
"12:34:56:00:01:01:01:a1"
"12:34:56:00:01:01:01:a1",
"00:11:22:33:00:11:45:fe"
]
},
{
@ -342,6 +328,21 @@
"setup_date": 1641841262,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:86:99",
"type": "NACamDoorTag",
"name": "Window Hall",
"setup_date": 1581177375,
"bridge": "12:34:56:00:f1:62",
"category": "window"
},
{
"id": "12:34:56:00:e3:9b",
"type": "NIS",
"setup_date": 1620479901,
"bridge": "12:34:56:00:f1:62",
"name": "Sirene in hall"
},
{
"id": "12:34:56:00:16:0e",
"type": "NLE",
@ -440,6 +441,24 @@
"room_id": "100008999",
"bridge": "12:34:56:80:60:40"
},
{
"id": "10:20:30:bd:b8:1e",
"type": "BNS",
"name": "Smarther",
"setup_date": 1638022197,
"room_id": "1002003001"
},
{
"id": "00:11:22:33:00:11:45:fe",
"type": "NLF",
"on": false,
"brightness": 63,
"firmware_revision": 57,
"last_seen": 1657086939,
"power": 0,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:01:01:01:a1",
"type": "NLFN",
@ -761,80 +780,13 @@
"therm_mode": "schedule"
},
{
"id": "111111111111111111111401",
"name": "Home with no modules",
"altitude": 9,
"coordinates": [1.23456789, 50.0987654],
"country": "BE",
"timezone": "Europe/Brussels",
"rooms": [
{
"id": "1111111401",
"name": "Livingroom",
"type": "livingroom"
}
],
"temperature_control_mode": "heating",
"therm_mode": "away",
"therm_setpoint_default_duration": 120,
"cooling_mode": "schedule",
"schedules": [
{
"away_temp": 14,
"hg_temp": 7,
"name": "Week",
"timetable": [
{
"zone_id": 1,
"m_offset": 0
},
{
"zone_id": 6,
"m_offset": 420
}
],
"zones": [
{
"type": 0,
"name": "Comfort",
"rooms_temp": [],
"id": 0,
"rooms": []
},
{
"type": 1,
"name": "Nacht",
"rooms_temp": [],
"id": 1,
"rooms": []
},
{
"type": 5,
"name": "Eco",
"rooms_temp": [],
"id": 4,
"rooms": []
},
{
"type": 4,
"name": "Tussenin",
"rooms_temp": [],
"id": 5,
"rooms": []
},
{
"type": 4,
"name": "Ochtend",
"rooms_temp": [],
"id": 6,
"rooms": []
}
],
"id": "700000000000000000000401",
"selected": true,
"type": "therm"
}
]
"id": "91763b24c43d3e344f424e8c",
"altitude": 112,
"coordinates": [52.516263, 13.377726],
"country": "DE",
"timezone": "Europe/Berlin",
"therm_setpoint_default_duration": 180,
"therm_mode": "schedule"
}
],
"user": {
@ -845,6 +797,8 @@
"unit_pressure": 0,
"unit_system": 0,
"unit_wind": 0,
"all_linked": false,
"type": "netatmo",
"id": "91763b24c43d3e344f424e8b"
}
},

View file

@ -14,25 +14,6 @@
"vpn_url": "https://prodvpn-eu-2.netatmo.net/restricted/10.255.123.45/609e27de5699fb18147ab47d06846631/MTRPn_BeWCav5RBq4U1OMDruTW4dkQ0NuMwNDAw11g,,",
"is_local": true
},
{
"type": "NOC",
"firmware_revision": 3002000,
"monitoring": "on",
"sd_status": 4,
"connection": "wifi",
"homekit_status": "upgradable",
"floodlight": "auto",
"timelapse_available": true,
"id": "12:34:56:00:a5:a4",
"vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.41/333333333333/444444444444,,",
"is_local": false,
"network_lock": false,
"firmware_name": "3.2.0",
"wifi_strength": 62,
"alim_status": 2,
"locked": false,
"wifi_state": "high"
},
{
"id": "12:34:56:00:fa:d0",
"type": "NAPlug",
@ -46,6 +27,7 @@
"type": "NATherm1",
"firmware_revision": 65,
"rf_strength": 58,
"battery_level": 3793,
"boiler_valve_comfort_boost": false,
"boiler_status": false,
"anticipating": false,
@ -58,6 +40,7 @@
"type": "NRV",
"firmware_revision": 79,
"rf_strength": 51,
"battery_level": 3025,
"bridge": "12:34:56:00:fa:d0",
"battery_state": "full"
},
@ -67,18 +50,10 @@
"type": "NRV",
"firmware_revision": 79,
"rf_strength": 59,
"battery_level": 3029,
"bridge": "12:34:56:00:fa:d0",
"battery_state": "full"
},
{
"id": "12:34:56:26:cc:01",
"type": "BNS",
"firmware_revision": 32,
"wifi_strength": 50,
"boiler_valve_comfort_boost": false,
"boiler_status": true,
"cooler_status": false
},
{
"type": "NDB",
"last_ftp_event": {
@ -100,6 +75,25 @@
"wifi_strength": 66,
"wifi_state": "medium"
},
{
"type": "NOC",
"firmware_revision": 3002000,
"monitoring": "on",
"sd_status": 4,
"connection": "wifi",
"homekit_status": "upgradable",
"floodlight": "auto",
"timelapse_available": true,
"id": "12:34:56:10:b9:0e",
"vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.41/333333333333/444444444444,,",
"is_local": false,
"network_lock": false,
"firmware_name": "3.2.0",
"wifi_strength": 62,
"alim_status": 2,
"locked": false,
"wifi_state": "high"
},
{
"boiler_control": "onoff",
"dhw_control": "none",
@ -264,609 +258,23 @@
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:01:01:01:a1",
"brightness": 100,
"firmware_revision": 52,
"last_seen": 1604940167,
"on": false,
"power": 0,
"reachable": true,
"type": "NLFN",
"bridge": "12:34:56:80:60:40"
},
{
"type": "NDB",
"last_ftp_event": {
"type": 3,
"time": 1631444443,
"id": 3
},
"id": "12:34:56:10:f1:66",
"websocket_connected": true,
"vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.40/1111111111111/2222222222222,,",
"is_local": false,
"alim_status": 2,
"connection": "wifi",
"firmware_name": "2.18.0",
"firmware_revision": 2018000,
"homekit_status": "configured",
"max_peers_reached": false,
"sd_status": 4,
"wifi_strength": 66,
"wifi_state": "medium"
},
{
"boiler_control": "onoff",
"dhw_control": "none",
"firmware_revision": 22,
"hardware_version": 222,
"id": "12:34:56:20:f5:44",
"outdoor_temperature": 8.2,
"sequence_id": 19764,
"type": "OTH",
"wifi_strength": 57
},
{
"battery_level": 4176,
"boiler_status": false,
"id": "10:20:30:bd:b8:1e",
"type": "BNS",
"firmware_revision": 32,
"wifi_strength": 49,
"boiler_valve_comfort_boost": false,
"firmware_revision": 6,
"id": "12:34:56:20:f5:8c",
"last_message": 1637684297,
"last_seen": 1637684297,
"radio_id": 2,
"reachable": true,
"rf_strength": 64,
"type": "OTM",
"bridge": "12:34:56:20:f5:44",
"battery_state": "full"
"boiler_status": true,
"cooler_status": false
},
{
"id": "12:34:56:30:d5:d4",
"type": "NBG",
"firmware_revision": 39,
"wifi_strength": 65,
"reachable": true
},
{
"id": "0009999992",
"type": "NBR",
"current_position": 0,
"target_position": 0,
"target_position_step": 100,
"firmware_revision": 16,
"rf_strength": 0,
"last_seen": 1638353156,
"reachable": true,
"therm_measured_temperature": 5,
"heating_power_request": 1,
"therm_setpoint_temperature": 7,
"therm_setpoint_mode": "away",
"therm_setpoint_start_time": 0,
"therm_setpoint_end_time": 0,
"anticipating": false,
"open_window": false
},
{
"id": "12:34:56:00:86:99",
"type": "NACamDoorTag",
"battery_state": "high",
"battery_level": 5240,
"firmware_revision": 58,
"rf_state": "full",
"rf_strength": 58,
"last_seen": 1642698124,
"last_activity": 1627757310,
"reachable": false,
"bridge": "12:34:56:00:f1:62",
"status": "no_news"
},
{
"id": "12:34:56:00:e3:9b",
"type": "NIS",
"battery_state": "low",
"battery_level": 5438,
"firmware_revision": 209,
"rf_state": "medium",
"rf_strength": 62,
"last_seen": 1644569790,
"reachable": true,
"bridge": "12:34:56:00:f1:62",
"status": "no_sound",
"monitoring": "off"
},
{
"id": "12:34:56:80:60:40",
"type": "NLG",
"offload": false,
"firmware_revision": 211,
"last_seen": 1644567372,
"wifi_strength": 51,
"reachable": true
},
{
"id": "12:34:56:80:00:12:ac:f2",
"type": "NLP",
"on": true,
"offload": false,
"firmware_revision": 62,
"last_seen": 1644569425,
"power": 0,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:80:00:c3:69:3c",
"type": "NLT",
"battery_state": "full",
"battery_level": 3300,
"firmware_revision": 42,
"last_seen": 0,
"reachable": false,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:16:0e",
"type": "NLE",
"firmware_revision": 14,
"wifi_strength": 38
},
{
"id": "12:34:56:00:16:0e#0",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#1",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#2",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#3",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#4",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#5",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#6",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#7",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#8",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:00:a1:4c:da",
"type": "NLPC",
"firmware_revision": 62,
"last_seen": 1646511241,
"power": 476,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:01:01:01:a1",
"brightness": 100,
"firmware_revision": 52,
"last_seen": 1604940167,
"id": "00:11:22:33:00:11:45:fe",
"type": "NLF",
"on": false,
"brightness": 63,
"firmware_revision": 57,
"last_seen": 1657086939,
"power": 0,
"reachable": true,
"type": "NLFN",
"bridge": "12:34:56:80:60:40"
},
{
"type": "NDB",
"last_ftp_event": {
"type": 3,
"time": 1631444443,
"id": 3
},
"id": "12:34:56:10:f1:66",
"websocket_connected": true,
"vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.40/1111111111111/2222222222222,,",
"is_local": false,
"alim_status": 2,
"connection": "wifi",
"firmware_name": "2.18.0",
"firmware_revision": 2018000,
"homekit_status": "configured",
"max_peers_reached": false,
"sd_status": 4,
"wifi_strength": 66,
"wifi_state": "medium"
},
{
"boiler_control": "onoff",
"dhw_control": "none",
"firmware_revision": 22,
"hardware_version": 222,
"id": "12:34:56:20:f5:44",
"outdoor_temperature": 8.2,
"sequence_id": 19764,
"type": "OTH",
"wifi_strength": 57
},
{
"battery_level": 4176,
"boiler_status": false,
"boiler_valve_comfort_boost": false,
"firmware_revision": 6,
"id": "12:34:56:20:f5:8c",
"last_message": 1637684297,
"last_seen": 1637684297,
"radio_id": 2,
"reachable": true,
"rf_strength": 64,
"type": "OTM",
"bridge": "12:34:56:20:f5:44",
"battery_state": "full"
},
{
"id": "12:34:56:30:d5:d4",
"type": "NBG",
"firmware_revision": 39,
"wifi_strength": 65,
"reachable": true
},
{
"id": "0009999992",
"type": "NBR",
"current_position": 0,
"target_position": 0,
"target_position_step": 100,
"firmware_revision": 16,
"rf_strength": 0,
"last_seen": 1638353156,
"reachable": true,
"therm_measured_temperature": 5,
"heating_power_request": 1,
"therm_setpoint_temperature": 7,
"therm_setpoint_mode": "away",
"therm_setpoint_start_time": 0,
"therm_setpoint_end_time": 0,
"anticipating": false,
"open_window": false
},
{
"id": "12:34:56:00:86:99",
"type": "NACamDoorTag",
"battery_state": "high",
"battery_level": 5240,
"firmware_revision": 58,
"rf_state": "full",
"rf_strength": 58,
"last_seen": 1642698124,
"last_activity": 1627757310,
"reachable": false,
"bridge": "12:34:56:00:f1:62",
"status": "no_news"
},
{
"id": "12:34:56:00:e3:9b",
"type": "NIS",
"battery_state": "low",
"battery_level": 5438,
"firmware_revision": 209,
"rf_state": "medium",
"rf_strength": 62,
"last_seen": 1644569790,
"reachable": true,
"bridge": "12:34:56:00:f1:62",
"status": "no_sound",
"monitoring": "off"
},
{
"id": "12:34:56:80:60:40",
"type": "NLG",
"offload": false,
"firmware_revision": 211,
"last_seen": 1644567372,
"wifi_strength": 51,
"reachable": true
},
{
"id": "12:34:56:80:00:12:ac:f2",
"type": "NLP",
"on": true,
"offload": false,
"firmware_revision": 62,
"last_seen": 1644569425,
"power": 0,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:80:00:c3:69:3c",
"type": "NLT",
"battery_state": "full",
"battery_level": 3300,
"firmware_revision": 42,
"last_seen": 0,
"reachable": false,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:16:0e",
"type": "NLE",
"firmware_revision": 14,
"wifi_strength": 38
},
{
"id": "12:34:56:00:16:0e#0",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#1",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#2",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#3",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#4",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#5",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#6",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#7",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#8",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:00:a1:4c:da",
"type": "NLPC",
"firmware_revision": 62,
"last_seen": 1646511241,
"power": 476,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:01:01:01:a1",
"brightness": 100,
"firmware_revision": 52,
"last_seen": 1604940167,
"on": false,
"power": 0,
"reachable": true,
"type": "NLFN",
"bridge": "12:34:56:80:60:40"
},
{
"type": "NDB",
"last_ftp_event": {
"type": 3,
"time": 1631444443,
"id": 3
},
"id": "12:34:56:10:f1:66",
"websocket_connected": true,
"vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.40/1111111111111/2222222222222,,",
"is_local": false,
"alim_status": 2,
"connection": "wifi",
"firmware_name": "2.18.0",
"firmware_revision": 2018000,
"homekit_status": "configured",
"max_peers_reached": false,
"sd_status": 4,
"wifi_strength": 66,
"wifi_state": "medium"
},
{
"boiler_control": "onoff",
"dhw_control": "none",
"firmware_revision": 22,
"hardware_version": 222,
"id": "12:34:56:20:f5:44",
"outdoor_temperature": 8.2,
"sequence_id": 19764,
"type": "OTH",
"wifi_strength": 57
},
{
"battery_level": 4176,
"boiler_status": false,
"boiler_valve_comfort_boost": false,
"firmware_revision": 6,
"id": "12:34:56:20:f5:8c",
"last_message": 1637684297,
"last_seen": 1637684297,
"radio_id": 2,
"reachable": true,
"rf_strength": 64,
"type": "OTM",
"bridge": "12:34:56:20:f5:44",
"battery_state": "full"
},
{
"id": "12:34:56:30:d5:d4",
"type": "NBG",
"firmware_revision": 39,
"wifi_strength": 65,
"reachable": true
},
{
"id": "0009999992",
"type": "NBR",
"current_position": 0,
"target_position": 0,
"target_position_step": 100,
"firmware_revision": 16,
"rf_strength": 0,
"last_seen": 1638353156,
"reachable": true,
"therm_measured_temperature": 5,
"heating_power_request": 1,
"therm_setpoint_temperature": 7,
"therm_setpoint_mode": "away",
"therm_setpoint_start_time": 0,
"therm_setpoint_end_time": 0,
"anticipating": false,
"open_window": false
},
{
"id": "12:34:56:00:86:99",
"type": "NACamDoorTag",
"battery_state": "high",
"battery_level": 5240,
"firmware_revision": 58,
"rf_state": "full",
"rf_strength": 58,
"last_seen": 1642698124,
"last_activity": 1627757310,
"reachable": false,
"bridge": "12:34:56:00:f1:62",
"status": "no_news"
},
{
"id": "12:34:56:00:e3:9b",
"type": "NIS",
"battery_state": "low",
"battery_level": 5438,
"firmware_revision": 209,
"rf_state": "medium",
"rf_strength": 62,
"last_seen": 1644569790,
"reachable": true,
"bridge": "12:34:56:00:f1:62",
"status": "no_sound",
"monitoring": "off"
},
{
"id": "12:34:56:80:60:40",
"type": "NLG",
"offload": false,
"firmware_revision": 211,
"last_seen": 1644567372,
"wifi_strength": 51,
"reachable": true
},
{
"id": "12:34:56:80:00:12:ac:f2",
"type": "NLP",
"on": true,
"offload": false,
"firmware_revision": 62,
"last_seen": 1644569425,
"power": 0,
"reachable": true,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:80:00:c3:69:3c",
"type": "NLT",
"battery_state": "full",
"battery_level": 3300,
"firmware_revision": 42,
"last_seen": 0,
"reachable": false,
"bridge": "12:34:56:80:60:40"
},
{
"id": "12:34:56:00:16:0e",
"type": "NLE",
"firmware_revision": 14,
"wifi_strength": 38
},
{
"id": "12:34:56:00:16:0e#0",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#1",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#2",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#3",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#4",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#5",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#6",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#7",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:16:0e#8",
"type": "NLE",
"bridge": "12:34:56:00:16:0e"
},
{
"id": "12:34:56:00:00:a1:4c:da",
"type": "NLPC",
"firmware_revision": 62,
"last_seen": 1646511241,
"power": 476,
"reachable": true,
"bridge": "12:34:56:80:60:40"
}
],
@ -876,17 +284,17 @@
"reachable": true,
"therm_measured_temperature": 19.8,
"therm_setpoint_temperature": 12,
"therm_setpoint_mode": "schedule",
"therm_setpoint_mode": "away",
"therm_setpoint_start_time": 1559229567,
"therm_setpoint_end_time": 0
},
{
"id": "2940411577",
"reachable": true,
"therm_measured_temperature": 5,
"heating_power_request": 1,
"therm_measured_temperature": 27,
"heating_power_request": 0,
"therm_setpoint_temperature": 7,
"therm_setpoint_mode": "away",
"therm_setpoint_mode": "hg",
"therm_setpoint_start_time": 0,
"therm_setpoint_end_time": 0,
"anticipating": false,
@ -905,15 +313,15 @@
"open_window": false
},
{
"id": "2940411588",
"id": "1002003001",
"reachable": true,
"anticipating": false,
"heating_power_request": 0,
"open_window": false,
"humidity": 68,
"therm_measured_temperature": 19.9,
"therm_setpoint_temperature": 21.5,
"therm_setpoint_start_time": 1647793285,
"humidity": 67,
"therm_measured_temperature": 22,
"therm_setpoint_temperature": 22,
"therm_setpoint_start_time": 1647462737,
"therm_setpoint_end_time": null,
"therm_setpoint_mode": "home"
}

View file

@ -1,12 +1,20 @@
{
"status": "ok",
"time_server": 1559292041,
"time_server": 1642952130,
"body": {
"home": {
"modules": [],
"rooms": [],
"id": "91763b24c43d3e344f424e8c",
"persons": []
"persons": [
{
"id": "abcdef12-1111-0000-0000-000111222333",
"last_seen": 1489050910,
"out_of_sight": true
},
{
"id": "abcdef12-2222-0000-0000-000111222333",
"last_seen": 1489078776,
"out_of_sight": true
}
]
}
}
}

View file

@ -33,7 +33,7 @@ async def test_setup_component_with_webhook(hass, config_entry, netatmo_auth):
await hass.async_block_till_done()
camera_entity_indoor = "camera.hall"
camera_entity_outdoor = "camera.garden"
camera_entity_outdoor = "camera.front"
assert hass.states.get(camera_entity_indoor).state == "streaming"
response = {
"event_type": "off",
@ -59,8 +59,8 @@ async def test_setup_component_with_webhook(hass, config_entry, netatmo_auth):
response = {
"event_type": "light_mode",
"device_id": "12:34:56:00:a5:a4",
"camera_id": "12:34:56:00:a5:a4",
"device_id": "12:34:56:10:b9:0e",
"camera_id": "12:34:56:10:b9:0e",
"event_id": "601dce1560abca1ebad9b723",
"push_type": "NOC-light_mode",
"sub_type": "on",
@ -72,8 +72,8 @@ async def test_setup_component_with_webhook(hass, config_entry, netatmo_auth):
response = {
"event_type": "light_mode",
"device_id": "12:34:56:00:a5:a4",
"camera_id": "12:34:56:00:a5:a4",
"device_id": "12:34:56:10:b9:0e",
"camera_id": "12:34:56:10:b9:0e",
"event_id": "601dce1560abca1ebad9b723",
"push_type": "NOC-light_mode",
"sub_type": "auto",
@ -84,7 +84,7 @@ async def test_setup_component_with_webhook(hass, config_entry, netatmo_auth):
response = {
"event_type": "light_mode",
"device_id": "12:34:56:00:a5:a4",
"device_id": "12:34:56:10:b9:0e",
"event_id": "601dce1560abca1ebad9b723",
"push_type": "NOC-light_mode",
}
@ -166,7 +166,7 @@ async def test_camera_image_vpn(hass, config_entry, requests_mock, netatmo_auth)
uri = "https://prodvpn-eu-6.netatmo.net/10.20.30.41/333333333333/444444444444,,"
stream_uri = uri + "/live/files/high/index.m3u8"
camera_entity_indoor = "camera.garden"
camera_entity_indoor = "camera.front"
cam = hass.states.get(camera_entity_indoor)
assert cam is not None
@ -304,14 +304,14 @@ async def test_service_set_camera_light(hass, config_entry, netatmo_auth):
await hass.async_block_till_done()
data = {
"entity_id": "camera.garden",
"entity_id": "camera.front",
"camera_light_mode": "on",
}
expected_data = {
"modules": [
{
"id": "12:34:56:00:a5:a4",
"id": "12:34:56:10:b9:0e",
"floodlight": "on",
},
],
@ -353,7 +353,6 @@ async def test_service_set_camera_light_invalid_type(hass, config_entry, netatmo
assert excinfo.value.args == ("NACamera <Hall> does not have a floodlight",)
@pytest.mark.skip
async def test_camera_reconnect_webhook(hass, config_entry):
"""Test webhook event on camera reconnect."""
fake_post_hits = 0
@ -406,7 +405,7 @@ async def test_camera_reconnect_webhook(hass, config_entry):
dt.utcnow() + timedelta(seconds=60),
)
await hass.async_block_till_done()
assert fake_post_hits > calls
assert fake_post_hits >= calls
async def test_webhook_person_event(hass, config_entry, netatmo_auth):

View file

@ -36,8 +36,7 @@ async def test_webhook_event_handling_thermostats(hass, config_entry, netatmo_au
assert hass.states.get(climate_entity_livingroom).state == "auto"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
assert hass.states.get(climate_entity_livingroom).attributes["temperature"] == 12
@ -80,8 +79,7 @@ async def test_webhook_event_handling_thermostats(hass, config_entry, netatmo_au
assert hass.states.get(climate_entity_livingroom).state == "heat"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
assert hass.states.get(climate_entity_livingroom).attributes["temperature"] == 21
@ -194,8 +192,7 @@ async def test_webhook_event_handling_thermostats(hass, config_entry, netatmo_au
assert hass.states.get(climate_entity_livingroom).state == "auto"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
@ -213,8 +210,7 @@ async def test_service_preset_mode_frost_guard_thermostat(
assert hass.states.get(climate_entity_livingroom).state == "auto"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
# Test service setting the preset mode to "frost guard"
@ -269,8 +265,7 @@ async def test_service_preset_mode_frost_guard_thermostat(
assert hass.states.get(climate_entity_livingroom).state == "auto"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
@ -286,8 +281,7 @@ async def test_service_preset_modes_thermostat(hass, config_entry, netatmo_auth)
assert hass.states.get(climate_entity_livingroom).state == "auto"
assert (
hass.states.get(climate_entity_livingroom).attributes["preset_mode"]
== "Schedule"
hass.states.get(climate_entity_livingroom).attributes["preset_mode"] == "away"
)
# Test service setting the preset mode to "away"

View file

@ -27,14 +27,14 @@ async def test_camera_light_setup_and_services(hass, config_entry, netatmo_auth)
await simulate_webhook(hass, webhook_id, FAKE_WEBHOOK_ACTIVATION)
await hass.async_block_till_done()
light_entity = "light.garden"
light_entity = "light.front"
assert hass.states.get(light_entity).state == "unavailable"
# Trigger light mode change
response = {
"event_type": "light_mode",
"device_id": "12:34:56:00:a5:a4",
"camera_id": "12:34:56:00:a5:a4",
"device_id": "12:34:56:10:b9:0e",
"camera_id": "12:34:56:10:b9:0e",
"event_id": "601dce1560abca1ebad9b723",
"push_type": "NOC-light_mode",
"sub_type": "on",
@ -46,7 +46,7 @@ async def test_camera_light_setup_and_services(hass, config_entry, netatmo_auth)
# Trigger light mode change with erroneous webhook data
response = {
"event_type": "light_mode",
"device_id": "12:34:56:00:a5:a4",
"device_id": "12:34:56:10:b9:0e",
}
await simulate_webhook(hass, webhook_id, response)
@ -62,7 +62,7 @@ async def test_camera_light_setup_and_services(hass, config_entry, netatmo_auth)
)
await hass.async_block_till_done()
mock_set_state.assert_called_once_with(
{"modules": [{"id": "12:34:56:00:a5:a4", "floodlight": "auto"}]}
{"modules": [{"id": "12:34:56:10:b9:0e", "floodlight": "auto"}]}
)
# Test turning light on
@ -75,7 +75,7 @@ async def test_camera_light_setup_and_services(hass, config_entry, netatmo_auth)
)
await hass.async_block_till_done()
mock_set_state.assert_called_once_with(
{"modules": [{"id": "12:34:56:00:a5:a4", "floodlight": "on"}]}
{"modules": [{"id": "12:34:56:10:b9:0e", "floodlight": "on"}]}
)

View file

@ -16,12 +16,12 @@ async def test_weather_sensor(hass, config_entry, netatmo_auth):
await hass.async_block_till_done()
prefix = "sensor.netatmoindoor_"
prefix = "sensor.parents_bedroom_"
assert hass.states.get(f"{prefix}temperature").state == "24.6"
assert hass.states.get(f"{prefix}humidity").state == "36"
assert hass.states.get(f"{prefix}co2").state == "749"
assert hass.states.get(f"{prefix}pressure").state == "1017.3"
assert hass.states.get(f"{prefix}temperature").state == "20.3"
assert hass.states.get(f"{prefix}humidity").state == "63"
assert hass.states.get(f"{prefix}co2").state == "494"
assert hass.states.get(f"{prefix}pressure").state == "1014.5"
async def test_public_weather_sensor(hass, config_entry, netatmo_auth):
@ -104,25 +104,25 @@ async def test_process_health(health, expected):
@pytest.mark.parametrize(
"uid, name, expected",
[
("12:34:56:37:11:ca-reachable", "mystation_reachable", "True"),
("12:34:56:03:1b:e4-rf_status", "mystation_yard_radio", "Full"),
("12:34:56:03:1b:e4-reachable", "villa_garden_reachable", "True"),
("12:34:56:03:1b:e4-rf_status", "villa_garden_radio", "Full"),
(
"12:34:56:37:11:ca-wifi_status",
"mystation_wifi_strength",
"Full",
"12:34:56:80:bb:26-wifi_status",
"villa_wifi_strength",
"High",
),
(
"12:34:56:37:11:ca-temp_trend",
"mystation_temperature_trend",
"12:34:56:80:bb:26-temp_trend",
"villa_temperature_trend",
"stable",
),
(
"12:34:56:37:11:ca-pressure_trend",
"netatmo_mystation_pressure_trend",
"down",
"12:34:56:80:bb:26-pressure_trend",
"villa_pressure_trend",
"up",
),
("12:34:56:05:51:20-sum_rain_1", "netatmo_mystation_yard_rain_last_hour", "0"),
("12:34:56:05:51:20-sum_rain_24", "netatmo_mystation_yard_rain_today", "0"),
("12:34:56:80:c1:ea-sum_rain_1", "villa_rain_rain_last_hour", "0"),
("12:34:56:80:c1:ea-sum_rain_24", "villa_rain_rain_today", "6.9"),
("12:34:56:03:1b:e4-windangle", "netatmoindoor_garden_direction", "SW"),
(
"12:34:56:03:1b:e4-windangle_value",