home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.2k stars 30.57k forks source link

Error Smartthings and Climate integration #47634

Closed jjprz closed 3 years ago

jjprz commented 3 years ago

The problem

I just integrated a samsung air conditioner into Smartthings and it is not added to Home Assistant. I have seen that 4 sensors are added (although in unknown state) but not a climate sensor.

What is version of Home Assistant Core has the issue?

core-2021.3.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

SmartThings

Link to integration documentation on our website

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

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line
Logger: homeassistant.components.climate
Source: util/temperature.py:31
Integration: Climatización ([documentation](https://www.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 11:39:44 (4 occurrences)
Last logged: 11:52:16

* Error adding entities for domain climate with platform smartthings
* Error while setting up smartthings platform for climate

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 424, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 189, in capability_attributes
    self.hass, self.min_temp, self.temperature_unit, self.precision
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 497, in min_temp
    return convert_temperature(
  File "/usr/src/homeassistant/homeassistant/util/temperature.py", line 31, in convert
    raise ValueError(UNIT_NOT_RECOGNIZED_TEMPLATE.format(to_unit, TEMPERATURE))
ValueError: None is not a recognized temperature unit.
probot-home-assistant[bot] commented 3 years ago

climate documentation climate source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

Hey there @andrewsayre, mind taking a look at this issue as its been labeled with an integration (smartthings) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

jjprz commented 3 years ago

I would appreciate some help, please

andrewsayre commented 3 years ago

From the logs, it appears the device is not reporting the temperature unit. Without that, we don't know if it's in Fahrenheit or Celsius. This is not a problem in the integration.

jjprz commented 3 years ago

Hello. I've been checking the api to find out why it doesn't show temperature unit. I have a mim-h03n device connected to an indoor unit. If I print the available devices, the indoor unit does not appear, only the mim-h03n appears, which only has the switch command enabled.

`{

"components": {
    "main": {
        "refresh": {},
        "airConditionerMode": {
            "supportedAcModes": {
                "value": null,
                "timestamp": "2021-03-08T09:52:20.895Z"
            },
            "airConditionerMode": {
                "value": null,
                "timestamp": "2021-03-08T09:52:20.895Z"
            }
        },
        "execute": {
            "data": {
                "value": null,
                "data": {},
                "timestamp": "2021-03-08T09:52:20.877Z"
            }
        },
        "airQualitySensor": {
            "airQuality": {
                "value": null,
                "unit": "CAQI",
                "timestamp": "2021-03-08T09:52:12.679Z"
            }
        },
        "switch": {
            "switch": {
                "value": "off",
                "timestamp": "2021-03-11T22:00:56.411Z"
            }
        },
        "ocf": {
            "st": {
                "value": null,
                "timestamp": "2021-03-08T10:12:49.838Z"
            },
            "mndt": {
                "value": null,
                "timestamp": "2021-03-08T10:12:48.117Z"
            },
            "mnfv": {
                "value": null,
                "timestamp": "2021-03-08T10:12:39.375Z"
            },
            "mnhw": {
                "value": null,
                "timestamp": "2021-03-08T10:12:36.834Z"
            },
            "mnsl": {
                "value": null,
                "timestamp": "2021-03-08T10:11:53.306Z"
            },
            "dmv": {
                "value": "res.1.1.0,sh.1.1.0",
                "timestamp": "2021-03-08T09:52:12.174Z"
            },
            "n": {
                "value": "A/A Salón",
                "timestamp": "2021-03-08T15:13:21.042Z"
            },
            "mnmo": {
                "value": "MIM-H03N",
                "timestamp": "2021-03-08T09:52:12.174Z"
            },
            "mnmn": {
                "value": "Samsung Electronics",
                "timestamp": "2021-03-08T09:52:12.174Z"
            },
            "mnml": {
                "value": null,
                "timestamp": "2021-03-08T10:11:50.068Z"
            },
            "mnpv": {
                "value": null,
                "timestamp": "2021-03-08T10:11:49.512Z"
            },
            "mnos": {
                "value": null,
                "timestamp": "2021-03-08T10:09:42.182Z"
            },
            "pi": {
                "value": "shp",
                "timestamp": "2021-03-08T10:09:41.775Z"
            },
            "icv": {
                "value": "core.1.1.0",
                "timestamp": "2021-03-08T09:52:12.174Z"
            }
        },
        "odorSensor": {
            "odorLevel": {
                "value": null,
                "timestamp": "2021-03-08T10:12:49.983Z"
            }
        },
        "airConditionerFanMode": {
            "fanMode": {
                "value": null,
                "timestamp": "2021-03-08T09:58:58.710Z"
            },
            "supportedAcFanModes": {
                "value": null,
                "timestamp": "2021-03-08T09:58:58.710Z"
            }
        },
        "custom.disabledCapabilities": {
            "disabledCapabilities": {
                "value": [
                    "airConditionerMode",
                    "airConditionerFanMode",
                    "temperatureMeasurement",
                    "thermostatCoolingSetpoint",
                    "airQualitySensor",
                    "dustSensor",
                    "odorSensor"
                ],
                "timestamp": "2021-03-08T09:52:12.215Z"
            }
        },
        "samsungce.driverVersion": {
            "versionNumber": {
                "value": 20090701,
                "timestamp": "2021-03-08T09:52:12.215Z"
            }
        },
        "temperatureMeasurement": {
            "temperature": {
                "value": null,
                "timestamp": "2021-03-08T09:58:58.100Z"
            }
        },
        "dustSensor": {
            "dustLevel": {
                "value": null,
                "unit": "μg/m^3",
                "timestamp": "2021-03-08T09:52:23.600Z"
            },
            "fineDustLevel": {
                "value": null,
                "unit": "μg/m^3",
                "timestamp": "2021-03-08T09:52:23.600Z"
            }
        },
        "thermostatCoolingSetpoint": {
            "coolingSetpoint": {
                "value": null,
                "timestamp": "2021-03-08T09:52:12.642Z"
            }
        }
    }
}

}`

Screenshot_20210312-002816_opt MIM-H03N

Screenshot_20210312-002825_opt indoor unit where you can choose temperature and various settings

I have also checked your "pysmartthings" library but the same problem happens. Do you know any way to be able to access the commands of the indoor unit? Do you know if this is possible?

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.