Repository: home-assistant/core
Pull request: Bump plugwise to v0.18.2
<!--
  You are amazing! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->

## Proposed change
<!--
  Describe the big picture of your changes here to communicate to the
  maintainers why we should accept this pull request. If it fixes a bug
  or resolves a feature request, be sure to link to that issue in the
  additional information section.
-->
Update to plugwise backend v0.18.2 and adapt code where needed.
Change info:
- https://github.com/plugwise/python-plugwise/releases/tag/v0.18.2
- https://github.com/plugwise/python-plugwise/releases/tag/v0.18.1
- https://github.com/plugwise/python-plugwise/releases/tag/v0.18.0
- https://github.com/plugwise/python-plugwise/releases/tag/v0.17.8
- https://github.com/plugwise/python-plugwise/releases/tag/v0.17.7
- https://github.com/plugwise/python-plugwise/releases/tag/v0.17.6
- https://github.com/plugwise/python-plugwise/releases/tag/v0.17.5
- https://github.com/plugwise/python-plugwise/releases/tag/v0.17.3

## Type of change
<!--
  What type of change does your PR introduce to Home Assistant?
  NOTE: Please, check only 1! box!
  If your PR requires multiple boxes to be checked, you'll most likely need to
  split it into multiple PRs. This makes things easier and faster to code review.
-->

- [x] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [x] Code quality improvements to existing code or addition of tests

## Additional information
<!--
  Details are important, and help maintainers processing your PR.
  Please be sure to fill out additional details, if applicable.
-->

- This PR fixes or closes issue: fixes https://github.com/plugwise/plugwise-beta/issues/277
- This PR is related to issue: 
- Link to documentation pull request: 

## Checklist
<!--
  Put an `x` in the boxes that apply. You can also fill these out after
  creating the PR. If you're unsure about any of them, don't hesitate to ask.
  We're here to help! This is simply a reminder of what we are going to look
  for before merging your code.
-->

- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]

If the code communicates with devices, web services, or third-party tools:

- [x] The [manifest file][manifest-docs] has all fields filled out correctly.  
      Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.  
      Updated by running `python3 -m script.gen_requirements_all`.
- [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to `.coveragerc`.

The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
  The Integration Quality Scale scores an integration on the code quality
  and user experience. Each level of the quality scale consists of a list
  of requirements. We highly recommend getting your integration scored!
-->

- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum

<!--
  This project is very active and we have a high turnover of pull requests.

  Unfortunately, the number of incoming pull requests is higher than what our
  reviewers can review and merge so there is a long backlog of pull requests
  waiting for review. You can help here!
  
  By reviewing another pull request, you will help raise the code quality of
  that pull request and the final review will be faster. This way the general
  pace of pull request reviews will go up and your wait time will go down.
  
  When picking a pull request to review, try to choose one that hasn't yet
  been reviewed.

  Thanks for helping out!
-->

To help with the load of incoming pull requests:

- [] I have reviewed two other [open pull requests][prs] in this repository.

[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure

<!--
  Thank you for contributing <3

  Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io


Problem statement:
[BUG]: Stretch: Circle+ is missing
### Describe the bug.

As reported by user Ollem, the Circle+ is not shown in HA.

### What version of Home Assistant Core has the issue?

2022.4

### What was the last working version of Home Assistant Core?

Unknown

### What type of installation are you running?

Home Assistant Core

### How did you install plugwise-beta?

HACS

### What kind of Plugwise device is having issues?

Smile: Stretch

### What firmware version is your Plugwise product at?

3.1.11

### Logging

_No response_

### Diagnostics information

_No response_

### Additional information

_No response_

Hints from issue discussion:
Fixed via https://github.com/plugwise/python-plugwise/pull/184
Same problem here.
I have installed 0.22.3 and still the Cirlce+ is missing.
The Circle+ is visible in Stretch available.
@willsmarthome Please test plugwise-beta v0.22.4b0, that version should  work.
@bouwew, after installing:  plugwise-beta v0.22.4b0 problem solved.
Thanks for confirming that the fix is working :)
I will release v0.22.4

Commit message: Presets no longer present, get preset_modes instead

Patch to review:
diff --git a/homeassistant/components/plugwise/climate.py b/homeassistant/components/plugwise/climate.py
index 91a56d09ee56e2..09f5181090c8b1 100644
--- a/homeassistant/components/plugwise/climate.py
+++ b/homeassistant/components/plugwise/climate.py
@@ -31,7 +31,7 @@ async def async_setup_entry(
     async_add_entities(
         PlugwiseClimateEntity(coordinator, device_id)
         for device_id, device in coordinator.data.devices.items()
-        if device["class"] in THERMOSTAT_CLASSES
+        if device["dev_class"] in THERMOSTAT_CLASSES
     )
 
 
@@ -53,9 +53,9 @@ def __init__(
 
         # Determine preset modes
         self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
-        if presets := self.device.get("presets"):
+        if presets := self.device.get("preset_modes"):
             self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
-            self._attr_preset_modes = list(presets)
+            self._attr_preset_modes = presets
 
         # Determine hvac modes and current hvac mode
         self._attr_hvac_modes = [HVACMode.HEAT]
diff --git a/homeassistant/components/plugwise/const.py b/homeassistant/components/plugwise/const.py
index 3bcad0b88aa899..336298a2dd4b80 100644
--- a/homeassistant/components/plugwise/const.py
+++ b/homeassistant/components/plugwise/const.py
@@ -1,51 +1,54 @@
 """Constants for Plugwise component."""
+from __future__ import annotations
+
 from datetime import timedelta
 import logging
+from typing import Final
 
 from homeassistant.const import Platform
 
-DOMAIN = "plugwise"
+DOMAIN: Final = "plugwise"
 
 LOGGER = logging.getLogger(__package__)
 
-API = "api"
-FLOW_SMILE = "smile (Adam/Anna/P1)"
-FLOW_STRETCH = "stretch (Stretch)"
-FLOW_TYPE = "flow_type"
-GATEWAY = "gateway"
-PW_TYPE = "plugwise_type"
-SMILE = "smile"
-STRETCH = "stretch"
-STRETCH_USERNAME = "stretch"
-UNIT_LUMEN = "lm"
-
-PLATFORMS_GATEWAY = [
+API: Final = "api"
+CONF_VENDOR: Final = "vendor"
+FLOW_SMILE: Final = "smile (Adam/Anna/P1)"
+FLOW_STRETCH: Final = "stretch (Stretch)"
+FLOW_TYPE: Final = "flow_type"
+GATEWAY: Final = "gateway"
+PW_TYPE: Final = "plugwise_type"
+SMILE: Final = "smile"
+STRETCH: Final = "stretch"
+STRETCH_USERNAME: Final = "stretch"
+UNIT_LUMEN: Final = "lm"
+
+PLATFORMS_GATEWAY: Final[list[str]] = [
     Platform.BINARY_SENSOR,
     Platform.CLIMATE,
     Platform.SENSOR,
-    Platform.SWITCH,
     Platform.SELECT,
+    Platform.SWITCH,
 ]
-ZEROCONF_MAP = {
+ZEROCONF_MAP: Final[dict[str, str]] = {
     "smile": "P1",
     "smile_thermo": "Anna",
     "smile_open_therm": "Adam",
     "stretch": "Stretch",
 }
 
-
 # Default directives
-DEFAULT_MAX_TEMP = 30
-DEFAULT_MIN_TEMP = 4
-DEFAULT_PORT = 80
-DEFAULT_SCAN_INTERVAL = {
+DEFAULT_MAX_TEMP: Final = 30
+DEFAULT_MIN_TEMP: Final = 4
+DEFAULT_PORT: Final = 80
+DEFAULT_SCAN_INTERVAL: Final[dict[str, timedelta]] = {
     "power": timedelta(seconds=10),
     "stretch": timedelta(seconds=60),
     "thermostat": timedelta(seconds=60),
 }
-DEFAULT_USERNAME = "smile"
+DEFAULT_USERNAME: Final = "smile"
 
-THERMOSTAT_CLASSES = [
+THERMOSTAT_CLASSES: Final[list[str]] = [
     "thermostat",
     "thermostatic_radiator_valve",
     "zone_thermometer",
diff --git a/homeassistant/components/plugwise/entity.py b/homeassistant/components/plugwise/entity.py
index b0896c3cd6dea0..7e44a39b6af53d 100644
--- a/homeassistant/components/plugwise/entity.py
+++ b/homeassistant/components/plugwise/entity.py
@@ -3,7 +3,7 @@
 
 from typing import Any
 
-from homeassistant.const import ATTR_NAME, ATTR_VIA_DEVICE, CONF_HOST
+from homeassistant.const import ATTR_NAME, ATTR_VIA_DEVICE, CONF_HOST, CONF_MODEL
 from homeassistant.helpers.device_registry import (
     CONNECTION_NETWORK_MAC,
     CONNECTION_ZIGBEE,
@@ -11,7 +11,7 @@
 from homeassistant.helpers.entity import DeviceInfo
 from homeassistant.helpers.update_coordinator import CoordinatorEntity
 
-from .const import DOMAIN
+from .const import CONF_VENDOR, DOMAIN
 from .coordinator import PlugwiseDataUpdateCoordinator
 
 
@@ -42,17 +42,17 @@ def __init__(
             configuration_url=configuration_url,
             identifiers={(DOMAIN, device_id)},
             connections=connections,
-            manufacturer=data.get("vendor"),
-            model=data.get("model"),
+            manufacturer=data.get(CONF_VENDOR),
+            model=data.get(CONF_MODEL),
             name=f"Smile {coordinator.data.gateway['smile_name']}",
-            sw_version=data.get("fw"),
-            hw_version=data.get("hw"),
+            sw_version=data.get("firmware"),
+            hw_version=data.get("hardware"),
         )
 
         if device_id != coordinator.data.gateway["gateway_id"]:
             self._attr_device_info.update(
                 {
-                    ATTR_NAME: data.get("name"),
+                    ATTR_NAME: data.get(ATTR_NAME),
                     ATTR_VIA_DEVICE: (
                         DOMAIN,
                         str(self.coordinator.data.gateway["gateway_id"]),
diff --git a/homeassistant/components/plugwise/gateway.py b/homeassistant/components/plugwise/gateway.py
index 648765155e4cc4..7eb2b1371d55d1 100644
--- a/homeassistant/components/plugwise/gateway.py
+++ b/homeassistant/components/plugwise/gateway.py
@@ -113,7 +113,7 @@ def migrate_sensor_entities(
 
     # Migrating opentherm_outdoor_temperature to opentherm_outdoor_air_temperature sensor
     for device_id, device in coordinator.data.devices.items():
-        if device["class"] != "heater_central":
+        if device["dev_class"] != "heater_central":
             continue
 
         old_unique_id = f"{device_id}-outdoor_temperature"
diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json
index 68ed6d6564732a..abf6f27b3fac0e 100644
--- a/homeassistant/components/plugwise/manifest.json
+++ b/homeassistant/components/plugwise/manifest.json
@@ -2,7 +2,7 @@
   "domain": "plugwise",
   "name": "Plugwise",
   "documentation": "https://www.home-assistant.io/integrations/plugwise",
-  "requirements": ["plugwise==0.17.3"],
+  "requirements": ["plugwise==0.18.2"],
   "codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"],
   "zeroconf": ["_plugwise._tcp.local."],
   "config_flow": true,
diff --git a/requirements_all.txt b/requirements_all.txt
index 4f8bf5649157c3..5ab00e7dbc5523 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -1239,7 +1239,7 @@ plexauth==0.0.6
 plexwebsocket==0.0.13
 
 # homeassistant.components.plugwise
-plugwise==0.17.3
+plugwise==0.18.2
 
 # homeassistant.components.plum_lightpad
 plumlightpad==0.0.11
diff --git a/requirements_test_all.txt b/requirements_test_all.txt
index e274844449b51c..d306f01ad1e39c 100644
--- a/requirements_test_all.txt
+++ b/requirements_test_all.txt
@@ -835,7 +835,7 @@ plexauth==0.0.6
 plexwebsocket==0.0.13
 
 # homeassistant.components.plugwise
-plugwise==0.17.3
+plugwise==0.18.2
 
 # homeassistant.components.plum_lightpad
 plumlightpad==0.0.11
diff --git a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json
index 4c4776f4063b8c..85e5abb0b176c7 100644
--- a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json
+++ b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json
@@ -12,26 +12,19 @@
   },
   {
     "df4a4a8169904cdb9c03d61a21f42140": {
-      "class": "zone_thermostat",
-      "fw": "2016-10-27T02:00:00+02:00",
-      "hw": "255",
+      "dev_class": "zone_thermostat",
+      "firmware": "2016-10-27T02:00:00+02:00",
+      "hardware": "255",
       "location": "12493538af164a409c6a1c79e38afe1c",
-      "mac_address": null,
       "model": "Lisa",
       "name": "Zone Lisa Bios",
+      "zigbee_mac_address": "ABCD012345670A06",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 99.9,
       "resolution": 0.01,
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["home", "asleep", "away", "no_frost"],
       "active_preset": "away",
-      "presets": {
-        "home": [20.0, 22.0],
-        "asleep": [17.0, 24.0],
-        "away": [15.0, 25.0],
-        "vacation": [15.0, 28.0],
-        "no_frost": [10.0, 30.0]
-      },
       "available_schedules": [
         "CV Roan",
         "Bios Schema met Film Avond",
@@ -41,7 +34,7 @@
       ],
       "selected_schedule": "None",
       "last_used": "Badkamer Schema",
-      "schedule_temperature": 15.0,
+      "schedule_temperature": 0.0,
       "mode": "heat",
       "sensors": {
         "temperature": 16.5,
@@ -50,13 +43,13 @@
       }
     },
     "b310b72a0e354bfab43089919b9a88bf": {
-      "class": "thermo_sensor",
-      "fw": "2019-03-27T01:00:00+01:00",
-      "hw": "1",
+      "dev_class": "thermo_sensor",
+      "firmware": "2019-03-27T01:00:00+01:00",
+      "hardware": "1",
       "location": "c50f167537524366a5af7aa3942feb1e",
-      "mac_address": null,
       "model": "Tom/Floor",
       "name": "Floor kraan",
+      "zigbee_mac_address": "ABCD012345670A02",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 100.0,
@@ -69,13 +62,13 @@
       }
     },
     "a2c3583e0a6349358998b760cea82d2a": {
-      "class": "thermo_sensor",
-      "fw": "2019-03-27T01:00:00+01:00",
-      "hw": "1",
+      "dev_class": "thermo_sensor",
+      "firmware": "2019-03-27T01:00:00+01:00",
+      "hardware": "1",
       "location": "12493538af164a409c6a1c79e38afe1c",
-      "mac_address": null,
       "model": "Tom/Floor",
       "name": "Bios Cv Thermostatic Radiator ",
+      "zigbee_mac_address": "ABCD012345670A09",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 100.0,
@@ -89,26 +82,19 @@
       }
     },
     "b59bcebaf94b499ea7d46e4a66fb62d8": {
-      "class": "zone_thermostat",
-      "fw": "2016-08-02T02:00:00+02:00",
-      "hw": "255",
+      "dev_class": "zone_thermostat",
+      "firmware": "2016-08-02T02:00:00+02:00",
+      "hardware": "255",
       "location": "c50f167537524366a5af7aa3942feb1e",
-      "mac_address": null,
       "model": "Lisa",
       "name": "Zone Lisa WK",
+      "zigbee_mac_address": "ABCD012345670A07",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 99.9,
       "resolution": 0.01,
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["home", "asleep", "away", "no_frost"],
       "active_preset": "home",
-      "presets": {
-        "home": [20.0, 22.0],
-        "asleep": [17.0, 24.0],
-        "away": [15.0, 25.0],
-        "vacation": [15.0, 28.0],
-        "no_frost": [10.0, 30.0]
-      },
       "available_schedules": [
         "CV Roan",
         "Bios Schema met Film Avond",
@@ -118,7 +104,7 @@
       ],
       "selected_schedule": "GF7  Woonkamer",
       "last_used": "GF7  Woonkamer",
-      "schedule_temperature": 20.0,
+      "schedule_temperature": 15.0,
       "mode": "auto",
       "sensors": {
         "temperature": 20.9,
@@ -127,15 +113,15 @@
       }
     },
     "fe799307f1624099878210aa0b9f1475": {
-      "class": "gateway",
-      "fw": "3.0.15",
-      "hw": "AME Smile 2.0 board",
+      "dev_class": "gateway",
+      "firmware": "3.0.15",
+      "hardware": "AME Smile 2.0 board",
       "location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
       "mac_address": "012345670001",
       "model": "Adam",
       "name": "Adam",
-      "vendor": "Plugwise B.V.",
       "zigbee_mac_address": "ABCD012345670101",
+      "vendor": "Plugwise B.V.",
       "regulation_mode": "heating",
       "regulation_modes": [],
       "binary_sensors": {
@@ -146,13 +132,13 @@
       }
     },
     "d3da73bde12a47d5a6b8f9dad971f2ec": {
-      "class": "thermo_sensor",
-      "fw": "2019-03-27T01:00:00+01:00",
-      "hw": "1",
+      "dev_class": "thermo_sensor",
+      "firmware": "2019-03-27T01:00:00+01:00",
+      "hardware": "1",
       "location": "82fa13f017d240daa0d0ea1775420f24",
-      "mac_address": null,
       "model": "Tom/Floor",
       "name": "Thermostatic Radiator Jessie",
+      "zigbee_mac_address": "ABCD012345670A10",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 100.0,
@@ -166,15 +152,13 @@
       }
     },
     "21f2b542c49845e6bb416884c55778d6": {
-      "class": "game_console",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "game_console",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "Playstation Smart Plug",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A12",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 82.6,
         "electricity_consumed_interval": 8.6,
@@ -187,15 +171,13 @@
       }
     },
     "78d1126fc4c743db81b61c20e88342a7": {
-      "class": "central_heating_pump",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "central_heating_pump",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "c50f167537524366a5af7aa3942feb1e",
-      "mac_address": null,
       "model": "Plug",
       "name": "CV Pomp",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A05",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 35.6,
         "electricity_consumed_interval": 7.37,
@@ -207,14 +189,10 @@
       }
     },
     "90986d591dcd426cae3ec3e8111ff730": {
-      "class": "heater_central",
-      "fw": null,
-      "hw": null,
+      "dev_class": "heater_central",
       "location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
-      "mac_address": null,
       "model": "Unknown",
       "name": "OnOff",
-      "vendor": null,
       "binary_sensors": {
         "heating_state": true
       },
@@ -225,15 +203,13 @@
       }
     },
     "cd0ddb54ef694e11ac18ed1cbce5dbbd": {
-      "class": "vcr",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "vcr",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "NAS",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A14",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 16.5,
         "electricity_consumed_interval": 0.5,
@@ -246,15 +222,13 @@
       }
     },
     "4a810418d5394b3f82727340b91ba740": {
-      "class": "router",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "router",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "USG Smart Plug",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A16",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 8.5,
         "electricity_consumed_interval": 0.0,
@@ -267,15 +241,13 @@
       }
     },
     "02cf28bfec924855854c544690a609ef": {
-      "class": "vcr",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "vcr",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "NVR",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A15",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 34.0,
         "electricity_consumed_interval": 9.15,
@@ -288,15 +260,13 @@
       }
     },
     "a28f588dc4a049a483fd03a30361ad3a": {
-      "class": "settop",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "settop",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "Fibaro HC2",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A13",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 12.5,
         "electricity_consumed_interval": 3.8,
@@ -309,26 +279,19 @@
       }
     },
     "6a3bf693d05e48e0b460c815a4fdd09d": {
-      "class": "zone_thermostat",
-      "fw": "2016-10-27T02:00:00+02:00",
-      "hw": "255",
+      "dev_class": "zone_thermostat",
+      "firmware": "2016-10-27T02:00:00+02:00",
+      "hardware": "255",
       "location": "82fa13f017d240daa0d0ea1775420f24",
-      "mac_address": null,
       "model": "Lisa",
       "name": "Zone Thermostat Jessie",
+      "zigbee_mac_address": "ABCD012345670A03",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 99.9,
       "resolution": 0.01,
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["home", "asleep", "away", "no_frost"],
       "active_preset": "asleep",
-      "presets": {
-        "home": [20.0, 22.0],
-        "asleep": [17.0, 24.0],
-        "away": [15.0, 25.0],
-        "vacation": [15.0, 28.0],
-        "no_frost": [10.0, 30.0]
-      },
       "available_schedules": [
         "CV Roan",
         "Bios Schema met Film Avond",
@@ -347,13 +310,13 @@
       }
     },
     "680423ff840043738f42cc7f1ff97a36": {
-      "class": "thermo_sensor",
-      "fw": "2019-03-27T01:00:00+01:00",
-      "hw": "1",
+      "dev_class": "thermo_sensor",
+      "firmware": "2019-03-27T01:00:00+01:00",
+      "hardware": "1",
       "location": "08963fec7c53423ca5680aa4cb502c63",
-      "mac_address": null,
       "model": "Tom/Floor",
       "name": "Thermostatic Radiator Badkamer",
+      "zigbee_mac_address": "ABCD012345670A17",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 100.0,
@@ -367,26 +330,19 @@
       }
     },
     "f1fee6043d3642a9b0a65297455f008e": {
-      "class": "zone_thermostat",
-      "fw": "2016-10-27T02:00:00+02:00",
-      "hw": "255",
+      "dev_class": "zone_thermostat",
+      "firmware": "2016-10-27T02:00:00+02:00",
+      "hardware": "255",
       "location": "08963fec7c53423ca5680aa4cb502c63",
-      "mac_address": null,
       "model": "Lisa",
       "name": "Zone Thermostat Badkamer",
+      "zigbee_mac_address": "ABCD012345670A08",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 99.9,
       "resolution": 0.01,
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["home", "asleep", "away", "no_frost"],
       "active_preset": "away",
-      "presets": {
-        "home": [20.0, 22.0],
-        "asleep": [17.0, 24.0],
-        "away": [15.0, 25.0],
-        "vacation": [15.0, 28.0],
-        "no_frost": [10.0, 30.0]
-      },
       "available_schedules": [
         "CV Roan",
         "Bios Schema met Film Avond",
@@ -405,15 +361,13 @@
       }
     },
     "675416a629f343c495449970e2ca37b5": {
-      "class": "router",
-      "fw": "2019-06-21T02:00:00+02:00",
-      "hw": null,
+      "dev_class": "router",
+      "firmware": "2019-06-21T02:00:00+02:00",
       "location": "cd143c07248f491493cea0533bc3d669",
-      "mac_address": null,
       "model": "Plug",
       "name": "Ziggo Modem",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A01",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 12.2,
         "electricity_consumed_interval": 2.97,
@@ -426,26 +380,19 @@
       }
     },
     "e7693eb9582644e5b865dba8d4447cf1": {
-      "class": "thermostatic_radiator_valve",
-      "fw": "2019-03-27T01:00:00+01:00",
-      "hw": "1",
+      "dev_class": "thermostatic_radiator_valve",
+      "firmware": "2019-03-27T01:00:00+01:00",
+      "hardware": "1",
       "location": "446ac08dd04d4eff8ac57489757b7314",
-      "mac_address": null,
       "model": "Tom/Floor",
       "name": "CV Kraan Garage",
+      "zigbee_mac_address": "ABCD012345670A11",
       "vendor": "Plugwise",
       "lower_bound": 0.0,
       "upper_bound": 100.0,
       "resolution": 0.01,
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["home", "asleep", "away", "no_frost"],
       "active_preset": "no_frost",
-      "presets": {
-        "home": [20.0, 22.0],
-        "asleep": [17.0, 24.0],
-        "away": [15.0, 25.0],
-        "vacation": [15.0, 28.0],
-        "no_frost": [10.0, 30.0]
-      },
       "available_schedules": [
         "CV Roan",
         "Bios Schema met Film Avond",
@@ -455,7 +402,7 @@
       ],
       "selected_schedule": "None",
       "last_used": "Badkamer Schema",
-      "schedule_temperature": 15.0,
+      "schedule_temperature": 0.0,
       "mode": "heat",
       "sensors": {
         "temperature": 15.6,
diff --git a/tests/components/plugwise/fixtures/anna_heatpump/all_data.json b/tests/components/plugwise/fixtures/anna_heatpump/all_data.json
index efc95494cad973..cc3f8d8f38513d 100644
--- a/tests/components/plugwise/fixtures/anna_heatpump/all_data.json
+++ b/tests/components/plugwise/fixtures/anna_heatpump/all_data.json
@@ -8,19 +8,16 @@
   },
   {
     "1cbf783bb11e4a7c8a6843dee3a86927": {
-      "class": "heater_central",
-      "fw": null,
-      "hw": null,
+      "dev_class": "heater_central",
       "location": "a57efe5f145f498c9be62a9b63626fbf",
-      "mac_address": null,
       "model": "Generic heater",
       "name": "OpenTherm",
       "vendor": "Techneco",
       "maximum_boiler_temperature": 60.0,
-      "compressor_state": true,
       "binary_sensors": {
         "dhw_state": false,
         "heating_state": true,
+        "compressor_state": true,
         "cooling_state": false,
         "slave_boiler_state": false,
         "flame_state": false
@@ -38,9 +35,9 @@
       }
     },
     "015ae9ea3f964e668e490fa39da3870b": {
-      "class": "gateway",
-      "fw": "4.0.15",
-      "hw": "AME Smile 2.0 board",
+      "dev_class": "gateway",
+      "firmware": "4.0.15",
+      "hardware": "AME Smile 2.0 board",
       "location": "a57efe5f145f498c9be62a9b63626fbf",
       "mac_address": "012345670001",
       "model": "Anna",
@@ -54,11 +51,10 @@
       }
     },
     "3cb70739631c4d17a86b8b12e8a5161b": {
-      "class": "thermostat",
-      "fw": "2018-02-08T11:15:53+01:00",
-      "hw": "6539-1301-5002",
+      "dev_class": "thermostat",
+      "firmware": "2018-02-08T11:15:53+01:00",
+      "hardware": "6539-1301-5002",
       "location": "c784ee9fdab44e1395b8dee7d7a497d5",
-      "mac_address": null,
       "model": "Anna",
       "name": "Anna",
       "vendor": "Plugwise",
@@ -67,13 +63,6 @@
       "resolution": 0.1,
       "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"],
       "active_preset": "home",
-      "presets": {
-        "no_frost": [10.0, 30.0],
-        "home": [21.0, 22.0],
-        "away": [20.0, 25.0],
-        "asleep": [20.5, 24.0],
-        "vacation": [17.0, 28.0]
-      },
       "available_schedules": ["None"],
       "selected_schedule": "None",
       "last_used": null,
diff --git a/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json b/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json
index f186335fcc9094..fbf5aa63a5ff3d 100644
--- a/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json
+++ b/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json
@@ -6,9 +6,9 @@
   },
   {
     "e950c7d5e1ee407a858e2a8b5016c8b3": {
-      "class": "gateway",
-      "fw": "3.3.9",
-      "hw": "AME Smile 2.0 board",
+      "dev_class": "gateway",
+      "firmware": "3.3.9",
+      "hardware": "AME Smile 2.0 board",
       "location": "cd3e822288064775a7c4afcdd70bdda2",
       "mac_address": "012345670001",
       "model": "P1",
diff --git a/tests/components/plugwise/fixtures/stretch_v31/all_data.json b/tests/components/plugwise/fixtures/stretch_v31/all_data.json
index 08ebab7b148fc2..1ff62e9e619b73 100644
--- a/tests/components/plugwise/fixtures/stretch_v31/all_data.json
+++ b/tests/components/plugwise/fixtures/stretch_v31/all_data.json
@@ -6,26 +6,24 @@
   },
   {
     "0000aaaa0000aaaa0000aaaa0000aa00": {
-      "class": "gateway",
-      "fw": "3.1.11",
-      "hw": null,
-      "mac_address": "01:23:45:67:89:AB",
+      "dev_class": "gateway",
+      "firmware": "3.1.11",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "vendor": "Plugwise B.V.",
+      "mac_address": "01:23:45:67:89:AB",
       "model": "Stretch",
       "name": "Stretch",
+      "vendor": "Plugwise B.V.",
       "zigbee_mac_address": "ABCD012345670101"
     },
     "5871317346d045bc9f6b987ef25ee638": {
-      "class": "water_heater_vessel",
-      "fw": "2011-06-27T10:52:18+02:00",
-      "hw": "6539-0701-4028",
+      "dev_class": "water_heater_vessel",
+      "firmware": "2011-06-27T10:52:18+02:00",
+      "hardware": "6539-0701-4028",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "mac_address": null,
       "model": "Circle type F",
       "name": "Boiler (1EB31)",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A07",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 1.19,
         "electricity_consumed_interval": 0.0,
@@ -37,13 +35,13 @@
       }
     },
     "e1c884e7dede431dadee09506ec4f859": {
-      "class": "refrigerator",
-      "fw": "2011-06-27T10:47:37+02:00",
-      "hw": "6539-0700-7330",
+      "dev_class": "refrigerator",
+      "firmware": "2011-06-27T10:47:37+02:00",
+      "hardware": "6539-0700-7330",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "mac_address": null,
       "model": "Circle+ type F",
       "name": "Koelkast (92C4A)",
+      "zigbee_mac_address": "0123456789AB",
       "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 50.5,
@@ -56,15 +54,14 @@
       }
     },
     "aac7b735042c4832ac9ff33aae4f453b": {
-      "class": "dishwasher",
-      "fw": "2011-06-27T10:52:18+02:00",
-      "hw": "6539-0701-4022",
+      "dev_class": "dishwasher",
+      "firmware": "2011-06-27T10:52:18+02:00",
+      "hardware": "6539-0701-4022",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "mac_address": null,
       "model": "Circle type F",
       "name": "Vaatwasser (2a1ab)",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A02",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 0.0,
         "electricity_consumed_interval": 0.71,
@@ -76,15 +73,14 @@
       }
     },
     "cfe95cf3de1948c0b8955125bf754614": {
-      "class": "dryer",
-      "fw": "2011-06-27T10:52:18+02:00",
-      "hw": "0000-0440-0107",
+      "dev_class": "dryer",
+      "firmware": "2011-06-27T10:52:18+02:00",
+      "hardware": "0000-0440-0107",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "mac_address": null,
       "model": "Circle type F",
       "name": "Droger (52559)",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A04",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 0.0,
         "electricity_consumed_interval": 0.0,
@@ -96,15 +92,14 @@
       }
     },
     "059e4d03c7a34d278add5c7a4a781d19": {
-      "class": "washingmachine",
-      "fw": "2011-06-27T10:52:18+02:00",
-      "hw": "0000-0440-0107",
+      "dev_class": "washingmachine",
+      "firmware": "2011-06-27T10:52:18+02:00",
+      "hardware": "0000-0440-0107",
       "location": "0000aaaa0000aaaa0000aaaa0000aa00",
-      "mac_address": null,
       "model": "Circle type F",
       "name": "Wasmachine (52AC1)",
-      "vendor": "Plugwise",
       "zigbee_mac_address": "ABCD012345670A01",
+      "vendor": "Plugwise",
       "sensors": {
         "electricity_consumed": 0.0,
         "electricity_consumed_interval": 0.0,
@@ -116,22 +111,16 @@
       }
     },
     "71e1944f2a944b26ad73323e399efef0": {
-      "class": "switching",
-      "fw": null,
-      "location": null,
+      "dev_class": "switching",
       "model": "Switchgroup",
       "name": "Test",
       "members": ["5ca521ac179d468e91d772eeeb8a2117"],
-      "types": ["switch_group"],
-      "vendor": null,
       "switches": {
         "relay": true
       }
     },
     "d950b314e9d8499f968e6db8d82ef78c": {
-      "class": "report",
-      "fw": null,
-      "location": null,
+      "dev_class": "report",
       "model": "Switchgroup",
       "name": "Stroomvreters",
       "members": [
@@ -141,24 +130,18 @@
         "cfe95cf3de1948c0b8955125bf754614",
         "e1c884e7dede431dadee09506ec4f859"
       ],
-      "types": ["switch_group"],
-      "vendor": null,
       "switches": {
         "relay": true
       }
     },
     "d03738edfcc947f7b8f4573571d90d2d": {
-      "class": "switching",
-      "fw": null,
-      "location": null,
+      "dev_class": "switching",
       "model": "Switchgroup",
       "name": "Schakel",
       "members": [
         "059e4d03c7a34d278add5c7a4a781d19",
         "cfe95cf3de1948c0b8955125bf754614"
       ],
-      "types": ["switch_group"],
-      "vendor": null,
       "switches": {
         "relay": true
       }
diff --git a/tests/components/plugwise/test_diagnostics.py b/tests/components/plugwise/test_diagnostics.py
index d6d1eebaf72adf..c2bb91746ae906 100644
--- a/tests/components/plugwise/test_diagnostics.py
+++ b/tests/components/plugwise/test_diagnostics.py
@@ -32,26 +32,19 @@ async def test_diagnostics(
         },
         "devices": {
             "df4a4a8169904cdb9c03d61a21f42140": {
-                "class": "zone_thermostat",
-                "fw": "2016-10-27T02:00:00+02:00",
-                "hw": "255",
+                "dev_class": "zone_thermostat",
+                "firmware": "2016-10-27T02:00:00+02:00",
+                "hardware": "255",
                 "location": "12493538af164a409c6a1c79e38afe1c",
-                "mac_address": None,
                 "model": "Lisa",
                 "name": "Zone Lisa Bios",
+                "zigbee_mac_address": "ABCD012345670A06",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 99.9,
                 "resolution": 0.01,
-                "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+                "preset_modes": ["home", "asleep", "away", "no_frost"],
                 "active_preset": "away",
-                "presets": {
-                    "home": [20.0, 22.0],
-                    "asleep": [17.0, 24.0],
-                    "away": [15.0, 25.0],
-                    "vacation": [15.0, 28.0],
-                    "no_frost": [10.0, 30.0],
-                },
                 "available_schedules": [
                     "CV Roan",
                     "Bios Schema met Film Avond",
@@ -61,18 +54,18 @@ async def test_diagnostics(
                 ],
                 "selected_schedule": "None",
                 "last_used": "Badkamer Schema",
-                "schedule_temperature": 15.0,
+                "schedule_temperature": 0.0,
                 "mode": "heat",
                 "sensors": {"temperature": 16.5, "setpoint": 13.0, "battery": 67},
             },
             "b310b72a0e354bfab43089919b9a88bf": {
-                "class": "thermo_sensor",
-                "fw": "2019-03-27T01:00:00+01:00",
-                "hw": "1",
+                "dev_class": "thermo_sensor",
+                "firmware": "2019-03-27T01:00:00+01:00",
+                "hardware": "1",
                 "location": "c50f167537524366a5af7aa3942feb1e",
-                "mac_address": None,
                 "model": "Tom/Floor",
                 "name": "Floor kraan",
+                "zigbee_mac_address": "ABCD012345670A02",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 100.0,
@@ -85,13 +78,13 @@ async def test_diagnostics(
                 },
             },
             "a2c3583e0a6349358998b760cea82d2a": {
-                "class": "thermo_sensor",
-                "fw": "2019-03-27T01:00:00+01:00",
-                "hw": "1",
+                "dev_class": "thermo_sensor",
+                "firmware": "2019-03-27T01:00:00+01:00",
+                "hardware": "1",
                 "location": "12493538af164a409c6a1c79e38afe1c",
-                "mac_address": None,
                 "model": "Tom/Floor",
                 "name": "Bios Cv Thermostatic Radiator ",
+                "zigbee_mac_address": "ABCD012345670A09",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 100.0,
@@ -105,26 +98,19 @@ async def test_diagnostics(
                 },
             },
             "b59bcebaf94b499ea7d46e4a66fb62d8": {
-                "class": "zone_thermostat",
-                "fw": "2016-08-02T02:00:00+02:00",
-                "hw": "255",
+                "dev_class": "zone_thermostat",
+                "firmware": "2016-08-02T02:00:00+02:00",
+                "hardware": "255",
                 "location": "c50f167537524366a5af7aa3942feb1e",
-                "mac_address": None,
                 "model": "Lisa",
                 "name": "Zone Lisa WK",
+                "zigbee_mac_address": "ABCD012345670A07",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 99.9,
                 "resolution": 0.01,
-                "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+                "preset_modes": ["home", "asleep", "away", "no_frost"],
                 "active_preset": "home",
-                "presets": {
-                    "home": [20.0, 22.0],
-                    "asleep": [17.0, 24.0],
-                    "away": [15.0, 25.0],
-                    "vacation": [15.0, 28.0],
-                    "no_frost": [10.0, 30.0],
-                },
                 "available_schedules": [
                     "CV Roan",
                     "Bios Schema met Film Avond",
@@ -134,33 +120,33 @@ async def test_diagnostics(
                 ],
                 "selected_schedule": "GF7  Woonkamer",
                 "last_used": "GF7  Woonkamer",
-                "schedule_temperature": 20.0,
+                "schedule_temperature": 15.0,
                 "mode": "auto",
                 "sensors": {"temperature": 20.9, "setpoint": 21.5, "battery": 34},
             },
             "fe799307f1624099878210aa0b9f1475": {
-                "class": "gateway",
-                "fw": "3.0.15",
-                "hw": "AME Smile 2.0 board",
+                "dev_class": "gateway",
+                "firmware": "3.0.15",
+                "hardware": "AME Smile 2.0 board",
                 "location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
                 "mac_address": "012345670001",
                 "model": "Adam",
                 "name": "Adam",
-                "vendor": "Plugwise B.V.",
                 "zigbee_mac_address": "ABCD012345670101",
+                "vendor": "Plugwise B.V.",
                 "regulation_mode": "heating",
                 "regulation_modes": [],
                 "binary_sensors": {"plugwise_notification": True},
                 "sensors": {"outdoor_temperature": 7.81},
             },
             "d3da73bde12a47d5a6b8f9dad971f2ec": {
-                "class": "thermo_sensor",
-                "fw": "2019-03-27T01:00:00+01:00",
-                "hw": "1",
+                "dev_class": "thermo_sensor",
+                "firmware": "2019-03-27T01:00:00+01:00",
+                "hardware": "1",
                 "location": "82fa13f017d240daa0d0ea1775420f24",
-                "mac_address": None,
                 "model": "Tom/Floor",
                 "name": "Thermostatic Radiator Jessie",
+                "zigbee_mac_address": "ABCD012345670A10",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 100.0,
@@ -174,15 +160,13 @@ async def test_diagnostics(
                 },
             },
             "21f2b542c49845e6bb416884c55778d6": {
-                "class": "game_console",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "game_console",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "Playstation Smart Plug",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A12",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 82.6,
                     "electricity_consumed_interval": 8.6,
@@ -192,15 +176,13 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": False},
             },
             "78d1126fc4c743db81b61c20e88342a7": {
-                "class": "central_heating_pump",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "central_heating_pump",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "c50f167537524366a5af7aa3942feb1e",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "CV Pomp",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A05",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 35.6,
                     "electricity_consumed_interval": 7.37,
@@ -210,14 +192,10 @@ async def test_diagnostics(
                 "switches": {"relay": True},
             },
             "90986d591dcd426cae3ec3e8111ff730": {
-                "class": "heater_central",
-                "fw": None,
-                "hw": None,
+                "dev_class": "heater_central",
                 "location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
-                "mac_address": None,
                 "model": "Unknown",
                 "name": "OnOff",
-                "vendor": None,
                 "binary_sensors": {"heating_state": True},
                 "sensors": {
                     "water_temperature": 70.0,
@@ -226,15 +204,13 @@ async def test_diagnostics(
                 },
             },
             "cd0ddb54ef694e11ac18ed1cbce5dbbd": {
-                "class": "vcr",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "vcr",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "NAS",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A14",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 16.5,
                     "electricity_consumed_interval": 0.5,
@@ -244,15 +220,13 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": True},
             },
             "4a810418d5394b3f82727340b91ba740": {
-                "class": "router",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "router",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "USG Smart Plug",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A16",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 8.5,
                     "electricity_consumed_interval": 0.0,
@@ -262,15 +236,13 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": True},
             },
             "02cf28bfec924855854c544690a609ef": {
-                "class": "vcr",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "vcr",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "NVR",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A15",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 34.0,
                     "electricity_consumed_interval": 9.15,
@@ -280,15 +252,13 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": True},
             },
             "a28f588dc4a049a483fd03a30361ad3a": {
-                "class": "settop",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "settop",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "Fibaro HC2",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A13",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 12.5,
                     "electricity_consumed_interval": 3.8,
@@ -298,26 +268,19 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": True},
             },
             "6a3bf693d05e48e0b460c815a4fdd09d": {
-                "class": "zone_thermostat",
-                "fw": "2016-10-27T02:00:00+02:00",
-                "hw": "255",
+                "dev_class": "zone_thermostat",
+                "firmware": "2016-10-27T02:00:00+02:00",
+                "hardware": "255",
                 "location": "82fa13f017d240daa0d0ea1775420f24",
-                "mac_address": None,
                 "model": "Lisa",
                 "name": "Zone Thermostat Jessie",
+                "zigbee_mac_address": "ABCD012345670A03",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 99.9,
                 "resolution": 0.01,
-                "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+                "preset_modes": ["home", "asleep", "away", "no_frost"],
                 "active_preset": "asleep",
-                "presets": {
-                    "home": [20.0, 22.0],
-                    "asleep": [17.0, 24.0],
-                    "away": [15.0, 25.0],
-                    "vacation": [15.0, 28.0],
-                    "no_frost": [10.0, 30.0],
-                },
                 "available_schedules": [
                     "CV Roan",
                     "Bios Schema met Film Avond",
@@ -332,13 +295,13 @@ async def test_diagnostics(
                 "sensors": {"temperature": 17.2, "setpoint": 15.0, "battery": 37},
             },
             "680423ff840043738f42cc7f1ff97a36": {
-                "class": "thermo_sensor",
-                "fw": "2019-03-27T01:00:00+01:00",
-                "hw": "1",
+                "dev_class": "thermo_sensor",
+                "firmware": "2019-03-27T01:00:00+01:00",
+                "hardware": "1",
                 "location": "08963fec7c53423ca5680aa4cb502c63",
-                "mac_address": None,
                 "model": "Tom/Floor",
                 "name": "Thermostatic Radiator Badkamer",
+                "zigbee_mac_address": "ABCD012345670A17",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 100.0,
@@ -352,26 +315,19 @@ async def test_diagnostics(
                 },
             },
             "f1fee6043d3642a9b0a65297455f008e": {
-                "class": "zone_thermostat",
-                "fw": "2016-10-27T02:00:00+02:00",
-                "hw": "255",
+                "dev_class": "zone_thermostat",
+                "firmware": "2016-10-27T02:00:00+02:00",
+                "hardware": "255",
                 "location": "08963fec7c53423ca5680aa4cb502c63",
-                "mac_address": None,
                 "model": "Lisa",
                 "name": "Zone Thermostat Badkamer",
+                "zigbee_mac_address": "ABCD012345670A08",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 99.9,
                 "resolution": 0.01,
-                "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+                "preset_modes": ["home", "asleep", "away", "no_frost"],
                 "active_preset": "away",
-                "presets": {
-                    "home": [20.0, 22.0],
-                    "asleep": [17.0, 24.0],
-                    "away": [15.0, 25.0],
-                    "vacation": [15.0, 28.0],
-                    "no_frost": [10.0, 30.0],
-                },
                 "available_schedules": [
                     "CV Roan",
                     "Bios Schema met Film Avond",
@@ -386,15 +342,13 @@ async def test_diagnostics(
                 "sensors": {"temperature": 18.9, "setpoint": 14.0, "battery": 92},
             },
             "675416a629f343c495449970e2ca37b5": {
-                "class": "router",
-                "fw": "2019-06-21T02:00:00+02:00",
-                "hw": None,
+                "dev_class": "router",
+                "firmware": "2019-06-21T02:00:00+02:00",
                 "location": "cd143c07248f491493cea0533bc3d669",
-                "mac_address": None,
                 "model": "Plug",
                 "name": "Ziggo Modem",
-                "vendor": "Plugwise",
                 "zigbee_mac_address": "ABCD012345670A01",
+                "vendor": "Plugwise",
                 "sensors": {
                     "electricity_consumed": 12.2,
                     "electricity_consumed_interval": 2.97,
@@ -404,26 +358,19 @@ async def test_diagnostics(
                 "switches": {"relay": True, "lock": True},
             },
             "e7693eb9582644e5b865dba8d4447cf1": {
-                "class": "thermostatic_radiator_valve",
-                "fw": "2019-03-27T01:00:00+01:00",
-                "hw": "1",
+                "dev_class": "thermostatic_radiator_valve",
+                "firmware": "2019-03-27T01:00:00+01:00",
+                "hardware": "1",
                 "location": "446ac08dd04d4eff8ac57489757b7314",
-                "mac_address": None,
                 "model": "Tom/Floor",
                 "name": "CV Kraan Garage",
+                "zigbee_mac_address": "ABCD012345670A11",
                 "vendor": "Plugwise",
                 "lower_bound": 0.0,
                 "upper_bound": 100.0,
                 "resolution": 0.01,
-                "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+                "preset_modes": ["home", "asleep", "away", "no_frost"],
                 "active_preset": "no_frost",
-                "presets": {
-                    "home": [20.0, 22.0],
-                    "asleep": [17.0, 24.0],
-                    "away": [15.0, 25.0],
-                    "vacation": [15.0, 28.0],
-                    "no_frost": [10.0, 30.0],
-                },
                 "available_schedules": [
                     "CV Roan",
                     "Bios Schema met Film Avond",
@@ -433,7 +380,7 @@ async def test_diagnostics(
                 ],
                 "selected_schedule": "None",
                 "last_used": "Badkamer Schema",
-                "schedule_temperature": 15.0,
+                "schedule_temperature": 0.0,
                 "mode": "heat",
                 "sensors": {
                     "temperature": 15.6,


Code review comments:
diff_hunk: @@ -42,17 +42,17 @@ def __init__(
             configuration_url=configuration_url,
             identifiers={(DOMAIN, device_id)},
             connections=connections,
-            manufacturer=data.get("vendor"),
-            model=data.get("model"),
+            manufacturer=data.get(CONF_VENDOR),
path: homeassistant/components/plugwise/entity.py
text: @user1:
This is not configuration? Why does it use `CONF_*` constant?

@author:
I copied this from another integration, don't remember which one.

@author:
Would you prefer I revert, or change to another varname in CAPITALS?

@user1:
We could use `ATTR_*` variants, however, I'm not sure if it's even needed. It's referencing external data, IMHO we can just use strings in these cases (especially since they are not used multiple times).

@author:
I'll revert these changes.