Error: not a valid value for dictionary value @ data['entity_id']

I have a GE Fan device that’s set up in Smartthings. The device can be manually controlled in HA without problem. However I’m unable to control it through a simple automation and I’m getting the error shown on the second picture. Any suggestion to solve this are welcome.

I’ve removed and re-added the Smartthings integration and I’m stil getting the error.

The error message is reporting that the value of entity_id is invalid. A switch entity’s entity_id will look like switch.my_fan whereas a fan entity’s entity_id will be like fan.my_fan.

What a valid entity_id will not be is a long alphanumeric string like the one shown in your screenshot.

Post your automation in YAML format.

I didn’t enter that obviously. It was autogenerated by HA using the model I posted earlier.

Then that’s something new because in previous versions of Home Assistant, a Device Action’s entity_id did not contain a random string of numbers and letters.

I suggest you replace the Device Action with a Service Call.

  - service: fan.turn_on
      entity_id: fan.your_fan

Replace fan.your_fan with your fan’s actual entity_id. Look for it in Developer Tools > States.


1 Like

I followed your suggestion and used the visual editor to call a service and it works. Thank you. I also included the resulting autogenerated yaml code.


Just want to say I get the exact same behavior. HA is generating some long string as the ID then complaining it’s invalid. I’m instead using hubitat which handles this easily and without need of being a programmer.


I had the same problem. It started right after using a helper to convert a switch in to a fan.

It endet after deleting the helper.

I used the device in 3 places. 2 ones where I switch the fan off worked. The one for switching on did not work like described above. After deleting the helper, it was marked as unknown and I could select the switch again and it worked from this time.