diff --git a/fixtures/adam_heatpump_cooling/all_data.json b/fixtures/adam_heatpump_cooling/all_data.json index 8c7e1667e..177015552 100644 --- a/fixtures/adam_heatpump_cooling/all_data.json +++ b/fixtures/adam_heatpump_cooling/all_data.json @@ -306,9 +306,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "cooling", "sensors": { - "outdoor_temperature": 13.4 + "solar_irradiance": 208.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 13.4, + "weather_description": "clouded", + "wind_bearing": 228.0, + "wind_speed": 1.79 + }, "zigbee_mac_address": "ABCD012345670101" }, "7fda9f84f01342f8afe9ebbbbff30c0f": { @@ -809,7 +816,7 @@ "cooling_present": true, "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 497, + "item_count": 502, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_jip/all_data.json b/fixtures/adam_jip/all_data.json index 1dfe021ac..f07addfdb 100644 --- a/fixtures/adam_jip/all_data.json +++ b/fixtures/adam_jip/all_data.json @@ -230,9 +230,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 24.9 + "solar_irradiance": 449.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 68, + "outdoor_temperature": 24.9, + "weather_description": "overcast", + "wind_bearing": 216.0, + "wind_speed": 2.68 + }, "zigbee_mac_address": "ABCD012345670101" }, "d27aede973b54be484f6842d1b2802ad": { @@ -373,7 +380,7 @@ "cooling_present": false, "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 244, + "item_count": 249, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_multiple_devices_per_zone/all_data.json b/fixtures/adam_multiple_devices_per_zone/all_data.json index 4c8242b35..9b09a6989 100644 --- a/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -581,9 +581,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 7.81 + "solar_irradiance": 157.5 }, "vendor": "Plugwise", + "weather": { + "humidity": 75, + "outdoor_temperature": 7.81, + "weather_description": "cloudy", + "wind_bearing": 40.0, + "wind_speed": 8.2 + }, "zigbee_mac_address": "ABCD012345670101" } }, @@ -591,7 +598,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, + "item_count": 374, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json index fba4e8168..b8cdc3d70 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json @@ -60,9 +60,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "cooling", "sensors": { - "outdoor_temperature": 13.4 + "solar_irradiance": 208.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 13.4, + "weather_description": "clouded", + "wind_bearing": 228.0, + "wind_speed": 1.79 + }, "zigbee_mac_address": "ABCD012345670101" }, "ca79d23ae0094120b877558734cff85c": { @@ -114,7 +121,7 @@ "cooling_present": true, "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 64, + "item_count": 69, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_plus_anna/all_data.json b/fixtures/adam_plus_anna/all_data.json index 1b2b11f71..5404aaab8 100644 --- a/fixtures/adam_plus_anna/all_data.json +++ b/fixtures/adam_plus_anna/all_data.json @@ -87,9 +87,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 11.9 + "solar_irradiance": 53.8 }, "vendor": "Plugwise", + "weather": { + "humidity": 58, + "outdoor_temperature": 11.9, + "weather_description": "overcast", + "wind_bearing": 220.0, + "wind_speed": 2.6 + }, "zigbee_mac_address": "ABCD012345670101" }, "ee62cad889f94e8ca3d09021f03a660b": { @@ -128,7 +135,7 @@ "cooling_present": false, "gateway_id": "b128b4bbbd1f47e9bf4d756e8fb5ee94", "heater_id": "2743216f626f43948deec1f7ab3b3d70", - "item_count": 80, + "item_count": 85, "notifications": { "6fb89e35caeb4b1cb275184895202d84": { "error": "There is no OpenTherm communication with the boiler." diff --git a/fixtures/adam_plus_anna_new/all_data.json b/fixtures/adam_plus_anna_new/all_data.json index 9e074f344..c6cf4f5a3 100644 --- a/fixtures/adam_plus_anna_new/all_data.json +++ b/fixtures/adam_plus_anna_new/all_data.json @@ -173,9 +173,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 9.19 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": 9.19, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { @@ -288,7 +295,7 @@ "cooling_present": false, "gateway_id": "da224107914542988a88561b4452b0f6", "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 177, + "item_count": 182, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_plus_anna_new_regulation_off/all_data.json b/fixtures/adam_plus_anna_new_regulation_off/all_data.json index 8d447dc81..456333816 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/all_data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/all_data.json @@ -173,9 +173,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "off", "sensors": { - "outdoor_temperature": 9.19 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": 9.19, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { @@ -288,7 +295,7 @@ "cooling_present": false, "gateway_id": "da224107914542988a88561b4452b0f6", "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 177, + "item_count": 182, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_zone_per_device/all_data.json b/fixtures/adam_zone_per_device/all_data.json index a8d028c19..7b70d312a 100644 --- a/fixtures/adam_zone_per_device/all_data.json +++ b/fixtures/adam_zone_per_device/all_data.json @@ -578,9 +578,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 7.69 + "solar_irradiance": 86.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 70, + "outdoor_temperature": 7.69, + "weather_description": "cloudy", + "wind_bearing": 40.0, + "wind_speed": 7.2 + }, "zigbee_mac_address": "ABCD012345670101" } }, @@ -588,7 +595,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, + "item_count": 374, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/anna_elga_2/all_data.json b/fixtures/anna_elga_2/all_data.json index e56ec7d35..9415bc082 100644 --- a/fixtures/anna_elga_2/all_data.json +++ b/fixtures/anna_elga_2/all_data.json @@ -84,16 +84,23 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 13.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 13.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } }, "gateway": { "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 63, + "item_count": 68, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_2_cooling/all_data.json b/fixtures/anna_elga_2_cooling/all_data.json index 7b580695e..bd050d100 100644 --- a/fixtures/anna_elga_2_cooling/all_data.json +++ b/fixtures/anna_elga_2_cooling/all_data.json @@ -84,16 +84,23 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 31.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 31.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } }, "gateway": { "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 63, + "item_count": 68, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_2_schedule_off/all_data.json b/fixtures/anna_elga_2_schedule_off/all_data.json index 9054718c1..2c5a16809 100644 --- a/fixtures/anna_elga_2_schedule_off/all_data.json +++ b/fixtures/anna_elga_2_schedule_off/all_data.json @@ -84,16 +84,23 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 13.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 13.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } }, "gateway": { "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 63, + "item_count": 68, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_no_cooling/all_data.json b/fixtures/anna_elga_no_cooling/all_data.json index 2fc1f56a0..fe1d0cf4f 100644 --- a/fixtures/anna_elga_no_cooling/all_data.json +++ b/fixtures/anna_elga_no_cooling/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 20.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 20.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -95,7 +102,7 @@ "cooling_present": false, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 63, + "item_count": 68, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_cooling/all_data.json b/fixtures/anna_heatpump_cooling/all_data.json index b7d0c0c84..6beef9c0c 100644 --- a/fixtures/anna_heatpump_cooling/all_data.json +++ b/fixtures/anna_heatpump_cooling/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 22.0 + "solar_irradiance": 207.2 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 35, + "outdoor_temperature": 22.0, + "weather_description": "overcast", + "wind_bearing": 0.0, + "wind_speed": 2.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -94,7 +101,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 64, + "item_count": 69, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json index 844cc7a59..fd3ee037e 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 22.0 + "solar_irradiance": 207.2 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 35, + "outdoor_temperature": 22.0, + "weather_description": "overcast", + "wind_bearing": 0.0, + "wind_speed": 2.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -94,7 +101,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 64, + "item_count": 69, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_heating/all_data.json b/fixtures/anna_heatpump_heating/all_data.json index 3a54c3fb9..9550d3fac 100644 --- a/fixtures/anna_heatpump_heating/all_data.json +++ b/fixtures/anna_heatpump_heating/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 20.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 20.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -99,7 +106,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 67, + "item_count": 72, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_cooling_active/all_data.json b/fixtures/anna_loria_cooling_active/all_data.json index 0f661f859..b28542138 100644 --- a/fixtures/anna_loria_cooling_active/all_data.json +++ b/fixtures/anna_loria_cooling_active/all_data.json @@ -47,9 +47,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 15.5 + "solar_irradiance": 84.7 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 65, + "outdoor_temperature": 15.5, + "weather_description": "overcast", + "wind_bearing": 289.0, + "wind_speed": 2.2 + } }, "bfb5ee0a88e14e5f97bfa725a760cc49": { "available": true, @@ -98,7 +105,7 @@ "cooling_present": true, "gateway_id": "9ff0569b4984459fb243af64c0901894", "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 66, + "item_count": 71, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_driessens/all_data.json b/fixtures/anna_loria_driessens/all_data.json index 6f5141e9b..46cf703a9 100644 --- a/fixtures/anna_loria_driessens/all_data.json +++ b/fixtures/anna_loria_driessens/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 6.81 + "solar_irradiance": 97.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 6.81, + "weather_description": "clouded", + "wind_bearing": 230.0, + "wind_speed": 4.12 + } }, "9fb768d699e44c7fb5cc50309dc4e7d4": { "active_preset": "home", @@ -104,7 +111,7 @@ "cooling_present": true, "gateway_id": "5c118b1842e943c0a5b6ef88a60bb17a", "heater_id": "a449cbc334ae4a5bb7f89064984b2906", - "item_count": 66, + "item_count": 71, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_heating_idle/all_data.json b/fixtures/anna_loria_heating_idle/all_data.json index c486f43f2..cee4f50cf 100644 --- a/fixtures/anna_loria_heating_idle/all_data.json +++ b/fixtures/anna_loria_heating_idle/all_data.json @@ -47,9 +47,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 15.5 + "solar_irradiance": 84.7 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 65, + "outdoor_temperature": 15.5, + "weather_description": "overcast", + "wind_bearing": 289.0, + "wind_speed": 2.2 + } }, "bfb5ee0a88e14e5f97bfa725a760cc49": { "available": true, @@ -98,7 +105,7 @@ "cooling_present": true, "gateway_id": "9ff0569b4984459fb243af64c0901894", "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 66, + "item_count": 71, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4/all_data.json b/fixtures/anna_v4/all_data.json index c2a07516b..ed2759875 100644 --- a/fixtures/anna_v4/all_data.json +++ b/fixtures/anna_v4/all_data.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, @@ -90,7 +97,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 58, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4_dhw/all_data.json b/fixtures/anna_v4_dhw/all_data.json index 6e1bd3944..1ef6f2036 100644 --- a/fixtures/anna_v4_dhw/all_data.json +++ b/fixtures/anna_v4_dhw/all_data.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, @@ -90,7 +97,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 58, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4_no_tag/all_data.json b/fixtures/anna_v4_no_tag/all_data.json index 086c7d094..6009cef85 100644 --- a/fixtures/anna_v4_no_tag/all_data.json +++ b/fixtures/anna_v4_no_tag/all_data.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, @@ -90,7 +97,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 58, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_without_boiler_fw441/all_data.json b/fixtures/anna_without_boiler_fw441/all_data.json index cd61c6b5b..a06469294 100644 --- a/fixtures/anna_without_boiler_fw441/all_data.json +++ b/fixtures/anna_without_boiler_fw441/all_data.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 8.31 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 91, + "outdoor_temperature": 8.31, + "weather_description": "rain", + "wind_bearing": 208.0, + "wind_speed": 6.77 + } }, "c46b4794d28149699eacf053deedd003": { "binary_sensors": { @@ -63,7 +70,7 @@ "cooling_present": false, "gateway_id": "a270735e4ccd45239424badc0578a2b1", "heater_id": "c46b4794d28149699eacf053deedd003", - "item_count": 39, + "item_count": 44, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/m_adam_cooling/all_data.json b/fixtures/m_adam_cooling/all_data.json index af6d4b833..c071af190 100644 --- a/fixtures/m_adam_cooling/all_data.json +++ b/fixtures/m_adam_cooling/all_data.json @@ -90,9 +90,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "cooling", "sensors": { - "outdoor_temperature": 29.65 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": 29.65, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { diff --git a/fixtures/m_adam_heating/all_data.json b/fixtures/m_adam_heating/all_data.json index bb24faeeb..67ed4f700 100644 --- a/fixtures/m_adam_heating/all_data.json +++ b/fixtures/m_adam_heating/all_data.json @@ -89,9 +89,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": -1.25 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": -1.25, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { diff --git a/fixtures/m_adam_jip/all_data.json b/fixtures/m_adam_jip/all_data.json index 1a3ef66c1..6387917ea 100644 --- a/fixtures/m_adam_jip/all_data.json +++ b/fixtures/m_adam_jip/all_data.json @@ -229,9 +229,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 24.9 + "solar_irradiance": 449.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 68, + "outdoor_temperature": 24.9, + "weather_description": "overcast", + "wind_bearing": 216.0, + "wind_speed": 2.68 + }, "zigbee_mac_address": "ABCD012345670101" }, "d27aede973b54be484f6842d1b2802ad": { @@ -372,7 +379,7 @@ "cooling_present": false, "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 244, + "item_count": 249, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/m_adam_multiple_devices_per_zone/all_data.json b/fixtures/m_adam_multiple_devices_per_zone/all_data.json index 8da184a7a..dae850b36 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/all_data.json @@ -572,9 +572,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 7.81 + "solar_irradiance": 157.5 }, "vendor": "Plugwise", + "weather": { + "humidity": 75, + "outdoor_temperature": 7.81, + "weather_description": "cloudy", + "wind_bearing": 40.0, + "wind_speed": 8.2 + }, "zigbee_mac_address": "ABCD012345670101" } }, @@ -582,7 +589,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, + "item_count": 374, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/m_anna_heatpump_cooling/all_data.json b/fixtures/m_anna_heatpump_cooling/all_data.json index eaa42facf..d9ead0227 100644 --- a/fixtures/m_anna_heatpump_cooling/all_data.json +++ b/fixtures/m_anna_heatpump_cooling/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 28.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 28.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -99,7 +106,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 67, + "item_count": 72, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/m_anna_heatpump_idle/all_data.json b/fixtures/m_anna_heatpump_idle/all_data.json index 52645b0f3..d0c222ecb 100644 --- a/fixtures/m_anna_heatpump_idle/all_data.json +++ b/fixtures/m_anna_heatpump_idle/all_data.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 28.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 28.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, @@ -99,7 +106,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 67, + "item_count": 72, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/plugwise/common.py b/plugwise/common.py index d1300b592..f2019f54a 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -147,6 +147,8 @@ def _count_data_items(self, data: GwEntityData) -> None: self._count += len(data["sensors"]) - 1 if "switches" in data: self._count += len(data["switches"]) - 1 + if "weather" in data: + self._count += len(data["weather"]) - 1 self._count += len(data) def _power_data_peak_value(self, loc: Munch, legacy: bool) -> Munch: diff --git a/plugwise/constants.py b/plugwise/constants.py index 232da091b..af62fc2f8 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -126,7 +126,6 @@ # radiator_valve: 'uncorrected_temperature', 'temperature_offset' DEVICE_MEASUREMENTS: Final[dict[str, DATA | UOM]] = { - "humidity": UOM(NONE), # Specific for a Jip "illuminance": UOM(UNIT_LUMEN), # Specific for an Anna "temperature": UOM(TEMP_CELSIUS), # HA Core thermostat current_temperature "thermostat": DATA("setpoint", TEMP_CELSIUS), # HA Core thermostat setpoint @@ -144,6 +143,13 @@ "electricity_consumed": UOM(POWER_WATT), "electricity_produced": UOM(POWER_WATT), "relay": UOM(NONE), + ##################### + # Gateway weather related + "humidity": UOM(PERCENTAGE), # also present for a Jip + "outdoor_temperature": UOM(TEMP_CELSIUS), + "solar_irradiance": UOM(NONE), + "weather_description": UOM(NONE), + "wind_vector": UOM(NONE), } # Heater Central related measurements @@ -334,6 +340,7 @@ "setpoint", "setpoint_high", "setpoint_low", + "solar_irradiance", "temperature_difference", "valve_position", "voltage_phase_one", @@ -385,6 +392,14 @@ "cooling_enabled": "cooling_ena_switch", "domestic_hot_water_comfort_mode": "dhw_cm_switch", } +WeatherType = Literal[ + "humidity", + "outdoor_temperature", + "weather_description", + "wind_bearing", + "wind_speed", +] +WEATHER: Final[tuple[str, ...]] = get_args(WeatherType) ZONE_THERMOSTATS: Final[tuple[str, ...]] = ( "thermostat", @@ -478,6 +493,7 @@ class SmileSensors(TypedDict, total=False): return_temperature: float setpoint: float setpoint_high: float + solar_irradiance: float setpoint_low: float temperature_difference: float valve_position: int @@ -506,6 +522,16 @@ class ThermoLoc(TypedDict, total=False): secondary: list[str] +class WeatherData(TypedDict, total=False): + """Smile Weather data class.""" + + humidity: int + outdoor_temperature: float + weather_description: str + wind_bearing: float + wind_speed: float + + class ActuatorData(TypedDict, total=False): """Actuator data for thermostat types.""" @@ -577,6 +603,7 @@ class GwEntityData(TypedDict, total=False): switches: SmileSwitches temperature_offset: ActuatorData thermostat: ActuatorData + weather: WeatherData @dataclass diff --git a/plugwise/helper.py b/plugwise/helper.py index 58e499e0c..ef10dafd6 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -16,6 +16,7 @@ ADAM, ANNA, ATTR_NAME, + ATTR_UNIT_OF_MEASUREMENT, DATA, DEVICE_MEASUREMENTS, DHW_SETPOINT, @@ -43,6 +44,7 @@ SensorType, ThermoLoc, ToggleNameType, + WeatherType, ) from plugwise.exceptions import ( ConnectionFailedError, @@ -526,7 +528,12 @@ def _get_measurement_data(self, entity_id: str) -> GwEntityData: Collect the appliance-data based on entity_id. """ - data: GwEntityData = {"binary_sensors": {}, "sensors": {}, "switches": {}} + data: GwEntityData = { + "binary_sensors": {}, + "sensors": {}, + "switches": {}, + "weather": {}, + } # Get P1 smartmeter data from LOCATIONS entity = self.gw_entities[entity_id] # !! DON'T CHANGE below two if-lines, will break stuff !! @@ -559,7 +566,7 @@ def _get_measurement_data(self, entity_id: str) -> GwEntityData: self._get_regulation_mode(appliance, entity_id, data) self._get_gateway_mode(appliance, entity_id, data) - self._get_gateway_outdoor_temp(entity_id, data) + self._get_gateway_measurements(entity_id, data) if "c_heating_state" in data: self._process_c_heating_state(data) @@ -763,31 +770,62 @@ def _get_gateway_mode( data["select_gateway_mode"] = mode self._count += 1 - def _get_gateway_outdoor_temp(self, entity_id: str, data: GwEntityData) -> None: - """Adam & Anna: the Smile outdoor_temperature is present in DOMAIN_OBJECTS and LOCATIONS. + def _get_gateway_measurements(self, entity_id: str, data: GwEntityData) -> None: + """Adam & Anna: the Gateway weather-data is present under the Home location. Available under the Home location. """ - if self._is_thermostat and entity_id == self.gateway_id: - outdoor_temperature = self._object_value( - self._home_location, "outdoor_temperature" - ) - if outdoor_temperature is not None: - data.update({"sensors": {"outdoor_temperature": outdoor_temperature}}) - self._count += 1 + if not (self._is_thermostat and entity_id == self.gateway_id): + return + + measurements = DEVICE_MEASUREMENTS + for measurement, attrs in measurements.items(): + if ( + value := self._loc_value(self._home_location, measurement, attrs) + ) is None: + continue + + match measurement: + case "solar_irradiance": + # Not available in HA weather platform -> sensor + sensor = cast(SensorType, measurement) + data["sensors"][sensor] = float(value) + self._count += 1 + case "wind_vector": + value_list: list[str] = str(value).split(",") + data["weather"]["wind_speed"] = format_measure( + value_list[0].strip("("), + getattr(attrs, ATTR_UNIT_OF_MEASUREMENT), + ) + data["weather"]["wind_bearing"] = format_measure( + value_list[1].strip(")"), + getattr(attrs, ATTR_UNIT_OF_MEASUREMENT), + ) + self._count += 2 + case _: + key = cast(WeatherType, measurement) + data["weather"][key] = value + self._count += 1 - def _object_value(self, obj_id: str, measurement: str) -> float | int | None: + def _loc_value( + self, loc_id: str, measurement: str, attrs: DATA | UOM + ) -> float | int | str | None: """Helper-function for smile.py: _get_entity_data(). Obtain the value/state for the given object from a location in DOMAIN_OBJECTS """ - val: float | int | None = None - search = self._domain_objects - locator = f'./location[@id="{obj_id}"]/logs/point_log[type="{measurement}"]/period/measurement' - if (found := search.find(locator)) is not None: - val = format_measure(found.text, NONE) + locator = f"./location[@id='{loc_id}']/logs/point_log[type='{measurement}']/period/measurement" + if (found := self._domain_objects.find(locator)) is None: + return None - return val + value: str = found.text + match measurement: + case "humidity": + return int(float(value)) + case "outdoor_temperature" | "solar_irradiance": + return format_measure(value, getattr(attrs, ATTR_UNIT_OF_MEASUREMENT)) + case _: + return value def _process_c_heating_state(self, data: GwEntityData) -> None: """Helper-function for _get_measurement_data(). diff --git a/plugwise/util.py b/plugwise/util.py index e2d1a125a..c5e0ff18a 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -157,6 +157,7 @@ def format_measure(measure: str, unit: str) -> float | int: try: result = int(measure) if unit == TEMP_CELSIUS: + # Return for instance 20 (degrees) as 20.0 result = float(measure) except ValueError: float_measure = float(measure) @@ -203,12 +204,14 @@ def power_data_local_format( def remove_empty_platform_dicts(data: GwEntityData) -> None: """Helper-function for removing any empty platform dicts.""" - if not data["binary_sensors"]: + if "binary_sensors" in data and not data["binary_sensors"]: data.pop("binary_sensors") - if not data["sensors"]: + if "sensors" in data and not data["sensors"]: data.pop("sensors") - if not data["switches"]: + if "switches" in data and not data["switches"]: data.pop("switches") + if "weather" in data and not data["weather"]: + data.pop("weather") def return_valid(value: etree | None, default: etree) -> etree: diff --git a/pyproject.toml b/pyproject.toml index b573a777e..a60df5ff5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.6.4" +version = "1.7.0a1" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" diff --git a/scripts/manual_fixtures.py b/scripts/manual_fixtures.py index 6e5946c92..4d17096aa 100755 --- a/scripts/manual_fixtures.py +++ b/scripts/manual_fixtures.py @@ -139,7 +139,7 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"][ "regulation_modes" ].append("cooling") -m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"]["sensors"][ +m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"]["weather"][ "outdoor_temperature" ] = 29.65 @@ -220,7 +220,7 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"][ "regulation_modes" ].remove("cooling") -m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"]["sensors"][ +m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"]["weather"][ "outdoor_temperature" ] = -1.25 @@ -295,7 +295,7 @@ def json_writer(manual_name: str, all_data: dict) -> None: ] = 28.0 # Go for 015a -m_anna_heatpump_cooling["devices"]["015ae9ea3f964e668e490fa39da3870b"]["sensors"][ +m_anna_heatpump_cooling["devices"]["015ae9ea3f964e668e490fa39da3870b"]["weather"][ "outdoor_temperature" ] = 28.2 diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index 0dd1354b8..1d183a2bd 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.json @@ -306,9 +306,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "cooling", "sensors": { - "outdoor_temperature": 13.4 + "solar_irradiance": 208.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 13.4, + "weather_description": "clouded", + "wind_bearing": 228.0, + "wind_speed": 1.79 + }, "zigbee_mac_address": "ABCD012345670101" }, "7fda9f84f01342f8afe9ebbbbff30c0f": { diff --git a/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index 6d021a276..887bec69c 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -226,9 +226,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 24.9 + "solar_irradiance": 449.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 68, + "outdoor_temperature": 24.9, + "weather_description": "overcast", + "wind_bearing": 216.0, + "wind_speed": 2.68 + }, "zigbee_mac_address": "ABCD012345670101" }, "d27aede973b54be484f6842d1b2802ad": { diff --git a/tests/data/adam/adam_multiple_devices_per_zone.json b/tests/data/adam/adam_multiple_devices_per_zone.json index 523f9cfcc..e4f416f24 100644 --- a/tests/data/adam/adam_multiple_devices_per_zone.json +++ b/tests/data/adam/adam_multiple_devices_per_zone.json @@ -581,9 +581,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 7.81 + "solar_irradiance": 157.5 }, "vendor": "Plugwise", + "weather": { + "humidity": 75, + "outdoor_temperature": 7.81, + "weather_description": "cloudy", + "wind_bearing": 40.0, + "wind_speed": 8.2 + }, "zigbee_mac_address": "ABCD012345670101" } } diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index 612e5caa5..7e4e8c9ff 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.json @@ -60,9 +60,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "cooling", "sensors": { - "outdoor_temperature": 13.4 + "solar_irradiance": 208.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 13.4, + "weather_description": "clouded", + "wind_bearing": 228.0, + "wind_speed": 1.79 + }, "zigbee_mac_address": "ABCD012345670101" }, "ca79d23ae0094120b877558734cff85c": { diff --git a/tests/data/adam/adam_plus_anna.json b/tests/data/adam/adam_plus_anna.json index bf471305e..5c50dba41 100644 --- a/tests/data/adam/adam_plus_anna.json +++ b/tests/data/adam/adam_plus_anna.json @@ -87,9 +87,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 11.9 + "solar_irradiance": 53.8 }, "vendor": "Plugwise", + "weather": { + "humidity": 58, + "outdoor_temperature": 11.9, + "weather_description": "overcast", + "wind_bearing": 220.0, + "wind_speed": 2.6 + }, "zigbee_mac_address": "ABCD012345670101" }, "ee62cad889f94e8ca3d09021f03a660b": { diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index 22146d9f7..6abf114f2 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -173,9 +173,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 9.19 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": 9.19, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { diff --git a/tests/data/adam/adam_plus_anna_new_regulation_off.json b/tests/data/adam/adam_plus_anna_new_regulation_off.json index c27d1e58d..78a88b510 100644 --- a/tests/data/adam/adam_plus_anna_new_regulation_off.json +++ b/tests/data/adam/adam_plus_anna_new_regulation_off.json @@ -173,9 +173,16 @@ "select_gateway_mode": "full", "select_regulation_mode": "off", "sensors": { - "outdoor_temperature": 9.19 + "solar_irradiance": 3.0 }, "vendor": "Plugwise", + "weather": { + "humidity": 90, + "outdoor_temperature": 9.19, + "weather_description": "rain", + "wind_bearing": 291.0, + "wind_speed": 6.26 + }, "zigbee_mac_address": "000D6F000D5A168D" }, "e2f4322d57924fa090fbbc48b3a140dc": { diff --git a/tests/data/adam/adam_zone_per_device.json b/tests/data/adam/adam_zone_per_device.json index b16d8807c..543c79909 100644 --- a/tests/data/adam/adam_zone_per_device.json +++ b/tests/data/adam/adam_zone_per_device.json @@ -578,9 +578,16 @@ "name": "Adam", "select_regulation_mode": "heating", "sensors": { - "outdoor_temperature": 7.69 + "solar_irradiance": 86.2 }, "vendor": "Plugwise", + "weather": { + "humidity": 70, + "outdoor_temperature": 7.69, + "weather_description": "cloudy", + "wind_bearing": 40.0, + "wind_speed": 7.2 + }, "zigbee_mac_address": "ABCD012345670101" } } diff --git a/tests/data/anna/anna_elga_2.json b/tests/data/anna/anna_elga_2.json index 5eecd2289..4799b6f9f 100644 --- a/tests/data/anna/anna_elga_2.json +++ b/tests/data/anna/anna_elga_2.json @@ -84,9 +84,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 13.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 13.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } } } diff --git a/tests/data/anna/anna_elga_2_cooling.json b/tests/data/anna/anna_elga_2_cooling.json index 07ab576ef..91bdbd44b 100644 --- a/tests/data/anna/anna_elga_2_cooling.json +++ b/tests/data/anna/anna_elga_2_cooling.json @@ -84,9 +84,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 31.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 31.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } } } diff --git a/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json b/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json index cddbcd352..0ab0a275d 100644 --- a/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json +++ b/tests/data/anna/anna_elga_2_cooling_UPDATED_DATA.json @@ -84,9 +84,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 3.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 3.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } } } diff --git a/tests/data/anna/anna_elga_2_schedule_off.json b/tests/data/anna/anna_elga_2_schedule_off.json index 94afaa3ff..812d1c184 100644 --- a/tests/data/anna/anna_elga_2_schedule_off.json +++ b/tests/data/anna/anna_elga_2_schedule_off.json @@ -84,9 +84,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 13.0 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 13.0, + "weather_description": "cloudy", + "wind_bearing": 120.0, + "wind_speed": 3.6 + } } } } diff --git a/tests/data/anna/anna_elga_no_cooling.json b/tests/data/anna/anna_elga_no_cooling.json index 5653798f3..65df7acfa 100644 --- a/tests/data/anna/anna_elga_no_cooling.json +++ b/tests/data/anna/anna_elga_no_cooling.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 20.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 20.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, diff --git a/tests/data/anna/anna_heatpump_cooling.json b/tests/data/anna/anna_heatpump_cooling.json index fdca784f0..e7b79339f 100644 --- a/tests/data/anna/anna_heatpump_cooling.json +++ b/tests/data/anna/anna_heatpump_cooling.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 22.0 + "solar_irradiance": 207.2 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 35, + "outdoor_temperature": 22.0, + "weather_description": "overcast", + "wind_bearing": 0.0, + "wind_speed": 2.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, diff --git a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json index cbc7e0a85..3e0a9998d 100644 --- a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json +++ b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 22.0 + "solar_irradiance": 207.2 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 35, + "outdoor_temperature": 22.0, + "weather_description": "overcast", + "wind_bearing": 0.0, + "wind_speed": 2.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, diff --git a/tests/data/anna/anna_heatpump_heating.json b/tests/data/anna/anna_heatpump_heating.json index c1a6526ce..844d04351 100644 --- a/tests/data/anna/anna_heatpump_heating.json +++ b/tests/data/anna/anna_heatpump_heating.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 20.2 + "solar_irradiance": 653.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 42, + "outdoor_temperature": 20.2, + "weather_description": "clear", + "wind_bearing": 50.0, + "wind_speed": 4.1 + } }, "1cbf783bb11e4a7c8a6843dee3a86927": { "available": true, diff --git a/tests/data/anna/anna_loria_cooling_active.json b/tests/data/anna/anna_loria_cooling_active.json index 4c104d005..296b5e531 100644 --- a/tests/data/anna/anna_loria_cooling_active.json +++ b/tests/data/anna/anna_loria_cooling_active.json @@ -47,9 +47,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 15.5 + "solar_irradiance": 84.7 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 65, + "outdoor_temperature": 15.5, + "weather_description": "overcast", + "wind_bearing": 289.0, + "wind_speed": 2.2 + } }, "bfb5ee0a88e14e5f97bfa725a760cc49": { "available": true, diff --git a/tests/data/anna/anna_loria_driessens.json b/tests/data/anna/anna_loria_driessens.json index dd265e086..819ad1155 100644 --- a/tests/data/anna/anna_loria_driessens.json +++ b/tests/data/anna/anna_loria_driessens.json @@ -13,9 +13,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 6.81 + "solar_irradiance": 97.6 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 88, + "outdoor_temperature": 6.81, + "weather_description": "clouded", + "wind_bearing": 230.0, + "wind_speed": 4.12 + } }, "9fb768d699e44c7fb5cc50309dc4e7d4": { "active_preset": "home", diff --git a/tests/data/anna/anna_loria_heating_idle.json b/tests/data/anna/anna_loria_heating_idle.json index 5bd6afbc1..a0342331d 100644 --- a/tests/data/anna/anna_loria_heating_idle.json +++ b/tests/data/anna/anna_loria_heating_idle.json @@ -47,9 +47,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 15.5 + "solar_irradiance": 84.7 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 65, + "outdoor_temperature": 15.5, + "weather_description": "overcast", + "wind_bearing": 289.0, + "wind_speed": 2.2 + } }, "bfb5ee0a88e14e5f97bfa725a760cc49": { "available": true, diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 060168bc2..04393ebf0 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, diff --git a/tests/data/anna/anna_v4_UPDATED_DATA.json b/tests/data/anna/anna_v4_UPDATED_DATA.json index e3c4c1382..42ef62e55 100644 --- a/tests/data/anna/anna_v4_UPDATED_DATA.json +++ b/tests/data/anna/anna_v4_UPDATED_DATA.json @@ -48,7 +48,14 @@ }, "0466eae8520144c78afb29628384edeb": { "sensors": { - "outdoor_temperature": 6.44 + "solar_irradiance": 449.4 + }, + "weather": { + "humidity": 81, + "outdoor_temperature": 6.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 } } } diff --git a/tests/data/anna/anna_v4_dhw.json b/tests/data/anna/anna_v4_dhw.json index 8019a7bf5..168f9f3ef 100644 --- a/tests/data/anna/anna_v4_dhw.json +++ b/tests/data/anna/anna_v4_dhw.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, diff --git a/tests/data/anna/anna_v4_no_tag.json b/tests/data/anna/anna_v4_no_tag.json index 914cb889d..1f82571a6 100644 --- a/tests/data/anna/anna_v4_no_tag.json +++ b/tests/data/anna/anna_v4_no_tag.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 7.44 + "solar_irradiance": 449.4 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 81, + "outdoor_temperature": 7.44, + "weather_description": "clear", + "wind_bearing": 240.0, + "wind_speed": 3.6 + } }, "cd0e6156b1f04d5f952349ffbe397481": { "available": true, diff --git a/tests/data/anna/anna_without_boiler_fw441.json b/tests/data/anna/anna_without_boiler_fw441.json index d8b883551..da6bdb2d7 100644 --- a/tests/data/anna/anna_without_boiler_fw441.json +++ b/tests/data/anna/anna_without_boiler_fw441.json @@ -45,9 +45,16 @@ "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { - "outdoor_temperature": 8.31 + "solar_irradiance": 0.0 }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "weather": { + "humidity": 91, + "outdoor_temperature": 8.31, + "weather_description": "rain", + "wind_bearing": 208.0, + "wind_speed": 6.77 + } }, "c46b4794d28149699eacf053deedd003": { "binary_sensors": { diff --git a/tests/test_adam.py b/tests/test_adam.py index bc521104f..59b7e8911 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -36,7 +36,7 @@ async def test_connect_adam_plus_anna_new(self): assert smile.gateway_id == "da224107914542988a88561b4452b0f6" assert smile._last_active["f2bf9048bef64cc5b6d5110154e33c81"] == "Weekschema" assert smile._last_active["f871b8c4d63549319221e294e4f88074"] == "Badkamer" - assert self.entity_items == 177 + assert self.entity_items == 182 assert self.entity_list == [ "da224107914542988a88561b4452b0f6", "056ee145a816487eaa69243c3280f8bf", @@ -207,7 +207,7 @@ async def test_connect_adam_zone_per_device(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.entity_items == 369 + assert self.entity_items == 374 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications await smile.delete_notification() @@ -287,7 +287,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.entity_items == 369 + assert self.entity_items == 374 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications @@ -325,7 +325,7 @@ async def test_adam_heatpump_cooling(self): assert smile._last_active["a562019b0b1f47a4bde8ebe3dbe3e8a9"] == WERKDAG_SCHEMA assert smile._last_active["8cf650a4c10c44819e426bed406aec34"] == WERKDAG_SCHEMA assert smile._last_active["5cc21042f87f4b4c94ccb5537c47a53f"] == WERKDAG_SCHEMA - assert self.entity_items == 497 + assert self.entity_items == 502 assert self.cooling_present assert self._cooling_enabled @@ -348,7 +348,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): ) await self.device_test(smile, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 64 + assert self.entity_items == 69 assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -373,7 +373,7 @@ async def test_connect_adam_plus_anna(self): await self.device_test(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "b128b4bbbd1f47e9bf4d756e8fb5ee94" assert smile._last_active["009490cc2f674ce6b576863fbb64f867"] == "Weekschema" - assert self.entity_items == 80 + assert self.entity_items == 85 assert "6fb89e35caeb4b1cb275184895202d84" in self.notifications result = await self.tinker_thermostat( @@ -419,7 +419,7 @@ async def test_adam_plus_jip(self): assert smile._last_active["06aecb3d00354375924f50c47af36bd2"] is None assert smile._last_active["d27aede973b54be484f6842d1b2802ad"] is None assert smile._last_active["13228dab8ce04617af318a2888b3c548"] is None - assert self.entity_items == 244 + assert self.entity_items == 249 # Negative test result = await self.tinker_thermostat( diff --git a/tests/test_anna.py b/tests/test_anna.py index a5e81702b..651f70f3c 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -30,7 +30,7 @@ async def test_connect_anna_v4(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile.gateway_id == "0466eae8520144c78afb29628384edeb" assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.entity_items == 58 + assert self.entity_items == 63 assert not self.notifications assert not self.cooling_present @@ -109,7 +109,7 @@ async def test_connect_anna_v4_dhw(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.entity_items == 58 + assert self.entity_items == 63 assert not self.notifications result = await self.tinker_thermostat( @@ -138,7 +138,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(smile, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 58 + assert self.entity_items == 63 result = await self.tinker_thermostat( smile, @@ -167,7 +167,7 @@ async def test_connect_anna_without_boiler_fw441(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["c34c6864216446528e95d88985e714cc"] == "Normaal" - assert self.entity_items == 39 + assert self.entity_items == 44 assert not self.notifications result = await self.tinker_thermostat( @@ -196,7 +196,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 67 + assert self.entity_items == 72 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -226,7 +226,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( smile, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 64 + assert self.entity_items == 69 await smile.close_connection() await self.disconnect(server, client) @@ -252,7 +252,7 @@ async def test_connect_anna_heatpump_cooling(self): await self.device_test(smile, "2020-04-19 00:00:01", testdata) assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 64 + assert self.entity_items == 69 assert self.cooling_present assert not self.notifications @@ -298,7 +298,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(smile, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 64 + assert self.entity_items == 69 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -325,7 +325,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 63 + assert self.entity_items == 68 assert not self.notifications assert not self.cooling_present @@ -352,7 +352,7 @@ async def test_connect_anna_elga_2(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.entity_items == 63 + assert self.entity_items == 68 assert smile.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -377,7 +377,7 @@ async def test_connect_anna_elga_2_schedule_off(self): ) assert self.cooling_present assert not self._cooling_enabled - assert self.entity_items == 63 + assert self.entity_items == 68 await smile.close_connection() await self.disconnect(server, client) @@ -406,7 +406,7 @@ async def test_connect_anna_elga_2_cooling(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.entity_items == 63 + assert self.entity_items == 68 assert not self.notifications assert self.cooling_present @@ -460,7 +460,7 @@ async def test_connect_anna_loria_heating_idle(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.entity_items == 66 + assert self.entity_items == 71 assert self.cooling_present assert not self._cooling_enabled @@ -528,7 +528,7 @@ async def test_connect_anna_loria_cooling_active(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.entity_items == 66 + assert self.entity_items == 71 assert self.cooling_present assert self._cooling_enabled @@ -551,7 +551,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(smile, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 66 + assert self.entity_items == 71 assert self.cooling_present assert not self._cooling_enabled