Attempts to get Fanimation fan integrated into HA, Smartthings skipping the fan but imports everything else

The Thermador Oven and Dishwasher have on/off switch functionality.

The oven has a power and an energy sensor, but I haven’t examined them carefully to see if they actually show any data.

@GSzabados I tried your custom integration and I can see my fanimation fans which creates entities for both the light switch and fan switch but I can’t control the fan speed with it. It shows the slider if I create a mushroom card for it but it doesn’t actually control the speed. Now the difference is before it would give me an error saying fan speed wasn’t supported which yours doesn’t but like I said it just doesn’t do anything for the fan speed…just allows the slider to move back and forth but no control(note it doesn’t even make the fan beep when trying to change the speed like it does when you turn it on and off).

I have not tried to work on the fan part of the integration. In theory, if the fan switch and fan speed would be under the main component, then it would work out of the box with the Core integration, but as they are using the fan components in SmartThings, the Core integration drops them, the custom one loads them partially, only the switch one is working, because that’s where the code has been added for other than main components.
The original maintainer of the SmartThings integration was quite rejective to any suggestion to implement any custom or “non-standard” capabilities and components into the Core integration, he reasoned that those can be changed any time.
But to be honest, people want to use the SmartThings integration with devices which cannot be integrated into HA any different way. And most of the time that is mainly custom built component. Like all the Samsung branded products. They were not built to be compatible with SmartThings initially. Samsung just pushed them into the SmartThings ecosystem.

Truth be told it’s not the end of the world but if you can get it to work I would love it. Anything I can do to assist just let me know.

The working smartthings integration would only allow 4 fan settings regardless, so unfortunately it will never be as granular as the native Fanimation app. The only 3rd party integration I’ve seen working as intended is in Alexa.

If you make a few Scenes in Smartthings, those will transfer, and may have to suffice.

Brilliant. Smartthings + Scenes works. 2-way. Bit clunky but whatever!
I have 3 lighting presets (scenes) and 3 fan speed presets (scenes)

1 Like

@skavan
That looks great. Can you share your coding for the preset fan speeds?

I also noticed that Google recently fixed their fan speed integration, so just like Smartthings, Google Home now has a low, medium, high, boost setting. No telling how long that will last.

I figured out a workaround using Alexa to get more granular fan speeds.

I installed the Alexa Media Player integration through HACS. This allows you to send commands, as if they were voice commands, directly to Alexa Echo.

Then, I made scripts like this:

service: media_player.play_media
target:
  entity_id: media_player.mynames_s_echo_dot
data:
  media_content_type: custom
  media_content_id: set fan speed to 70

I just created a series of whatever convenient speeds I wanted. This was purely because the preset medium (48%) and high (77%) levels didn’t suit my needs.

I have gave it a try and tried to implement the “custom” component from the SmartThings API, but I might have missed a part in the logic to get the right capabilities.

Can you give a try to the pre-release 2024.9.0b and report back?

No luck. Same thing as before. Turns on/off but can’t adjust the speed at all. Any suggestions?

Was the device/entity set automatically to fan or you changed it manually?

Do you have any errors in the log if you try to change the speed?

As I don’t have any fans, it is hard to troubleshoot, I have updated the code quite blindly, likely I missed something, but if you have some errors in the log that can help a lot.

Can you share state and state attributes of the fan? (Developer Tools/States)

Hi

I deleted the old integration and devices and added them again and they still add as switches. I added the logs below for your reference(its kitchen fan). Hope this helps

Thanks again for working on this!

2024-09-12 11:05:39.843 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'on', 'data': {}}
2024-09-12 11:05:39.846 DEBUG (MainThread) [pysmartapp.smartapp] 85A53C4D96A253CBB2C: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.
2024-09-12 11:05:42.162 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:43.027 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:43.867 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:44.732 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:45.498 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:46.562 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 11:05:51.186 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'off', 'data': {}}
2024-09-12 11:05:51.189 DEBUG (MainThread) [pysmartapp.smartapp] 3056456644962594621: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.

I’ve tried something else, it is now 2024.9.2b, again a pre-release, so need to download it with HACS with the redownload option. It is not working, 2024.9.2b as well.
image

PS.: Let me know if it crashes… (2024.9.1b crashed).

Still no luck. See the updated logs

2024-09-12 19:17:52.395 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:04.078 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:07.676 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:09.415 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:38.734 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'on', 'data': {}}
2024-09-12 19:18:38.736 DEBUG (MainThread) [pysmartapp.smartapp] 5529265527683522173: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.
2024-09-12 19:18:39.903 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:41.471 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:42.827 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:44.408 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:45.260 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.outdoor_kitchen_fan_fan_switch are missing or not currently available
2024-09-12 19:18:48.827 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'off', 'data': {}}
2024-09-12 19:18:48.828 DEBUG (MainThread) [pysmartapp.smartapp] 6055975773442621568: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.

I have set incorrectly the version number in .1b, so it should have been blocked to run in Home Assistant, at least that’s what has happened on my system, and then when I corrected it in .2b it turned out some changes from the core integration, which I carried over has failed as well. So, I will try to revert those, and let you know once a new version is available. I will message you privately just to keep this topic clean, and will add here if there was a success.

I really believe that you have not updated as 2024.9.1b and 2b both had an issue which broke the whole integration, anyhow, I have found those and now made a release of 2024.9.3. Please update through HACS to that one and let me know if he fan shows up as a fan or not.

I definitely updated it each time and updated it again this time. What I did notice this time is it picks up a new entity for each fan which is identified as a fan. I added it to the card which like the others it turns on and off but this now gives an error when trying to change the fan speed:

Failed to perform the action fan/set_percentage. Entity fan.outdoor_kitchen_fan does not support this service.

Here are the logs

entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:05.269 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:06.027 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:06.508 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:30.305 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'on', 'data': {}}
2024-09-13 06:47:30.309 DEBUG (MainThread) [pysmartapp.smartapp] 3729480946117092807: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.
2024-09-13 06:47:31.256 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:31.977 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:32.824 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:33.676 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140064696830848] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.outdoor_kitchen_fan does not support this service.
2024-09-13 06:47:37.628 DEBUG (MainThread) [custom_components.smartthings] Push update received: {'location_id': 'bc2464d7-dc6f-4e3f-9da9-9132cc9e1d78', 'device_id': 'd096daae-6551-4c63-8e02-ae78471c7dc9', 'component_id': 'fan', 'capability': 'switch', 'attribute': 'switch', 'value': 'off', 'data': {}}
2024-09-13 06:47:37.630 DEBUG (MainThread) [pysmartapp.smartapp] 9196243865018556978: EVENT received for installed app 81ce49a4-ac34-4517-b22e-4de7bf4303c2.

It does fail, because it does not support the percentage. Just try the fan entity, it should have the on/off switch and should be a preset mode below that, like on the picture, it should give 3 or 4 options.

Also, can you share the state attributes of the fan entity from Developer Tools/States?

What card have you used?

Hi

I"m using a mushroom card but even if I go to the entity I don’t get the preset mode you get for the fans. I attached a picture of that and also the attributes for the fan. Let me know if you need anything else. Also thank you VERY much for the help!!


Again, I suspect where the issue is, I sent you some messages on chat, but meanwhile made a version 2024.9.4b, pre-release, where I rigged the fan entity and HA should think that the fan supports speed percentage (despite, that it will be only 3 options). If that works, then I need to figure out how to read correctly the capabilities from the SmartThings device, if not the back to the drawing board, again.

It should show supported_features: 56 in the new version.