core: Smartthings Device with 3 Components ==> Missing Switches / Sensors

The problem

I have a Heat pump with Samsung Wifi Kit. In the Smartthings App everything is working properly. The Heat pump is one device with 3 components. Warm Water, Normal Heating (INDOOR1) and Floor Heating (INDOOR2). In Home assistant I can only see the switch and actual values for the Warm Water. Please find the infos got by SmartthingsCLI below:

Main Info
───────────────────────────────────────────────────────────────
 Label                   Eco Heating System
 Name                    Eco Heating System
 Id                      xxx
 Type                    OCF
 Manufacturer Code       Samsung Electronics
 Location Id             xxx
 Room Id                 xxx
 Profile Id              xxx
 Capabilities            ocf
                         switch
                         temperatureMeasurement
                         thermostatCoolingSetpoint
                         thermostatHeatingSetpoint
                         airConditionerMode
                         powerConsumptionReport
                         demandResponseLoadControl
                         remoteControlStatus
                         refresh
                         execute
                         custom.energyType
                         custom.outingMode
                         custom.thermostatSetpointControl
                         custom.deviceReportStateConfiguration
                         custom.disabledCapabilities
                         samsungce.deviceIdentification
                         samsungce.driverVersion
                         samsungce.sacDisplayCondition
                         samsungce.softwareUpdate
                         samsungce.ehsFsvSettings
                         samsungce.ehsCycleData
                         samsungce.ehsTemperatureReference
                         samsungce.ehsThermostat
 Capabilities (INDOOR1)  switch
                         temperatureMeasurement
                         thermostatCoolingSetpoint
                         airConditionerMode
                         custom.thermostatSetpointControl
                         samsungce.ehsTemperatureReference
                         samsungce.ehsThermostat
                         samsungce.sacDisplayCondition
 Capabilities (INDOOR2)  switch
                         temperatureMeasurement
                         thermostatCoolingSetpoint
                         airConditionerMode
                         custom.thermostatSetpointControl
                         samsungce.ehsTemperatureReference
                         samsungce.ehsThermostat
                         samsungce.sacDisplayCondition
───────────────────────────────────────────────────────────────

There was a similar issue (#83136), but it has been closed by the bot.

What version of Home Assistant Core has the issue?

core-2023.4.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SmartThings

Link to integration documentation on our website

https://www.home-assistant.io/integrations/smartthings/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 27 (5 by maintainers)

Most upvoted comments

I have a PR which adds support for components: https://github.com/home-assistant/core/pull/99924

Hi @ePiccio, didn’t get to create custom integration out of that code yet, bit overloaded now, but will work on it as soon as I will be able to promote it, Current integration is great but limited for main component, it requires lot of changes because it has different data model than the API which makes it limited and all actions are pretty hard coded while definitions are part of the API, On the other hand, it supports webhooks to get updates while my code doesn’t support it, so that will be the main challenge, will keep you posted once it works

Integration is working with main device only, found the issue and working on PR, Managed to add all components related to devices for binary sensor, now working on other ha components.

I tried your fork, but I’m getting this error in the logs and the integration won’t start:

Error setting up entry Home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 125, in async_setup_entry
    token = await api.generate_tokens(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/pysmartthings/smartthings.py", line 209, in generate_tokens
    result = await self._service.generate_tokens(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/pysmartthings/api.py", line 424, in generate_tokens
    raise APIInvalidGrant(data.get("error_description"))
pysmartthings.errors.APIInvalidGrant: Empty scope (either the client or the user is not allowed the requested scopes)

EDIT: It seem like the error was fixed by removing the smartthings integration and setting it up again through the homeassistant ui. ~However, I still don’t see the sensors from any other component but the main one.~ It also seems like the manifest is missing the “version” property which prevents the integration from loading. Just add any dummy version in the manifest and you should be good to go!