How to enable/use Basic Profiles?

It’s probably something stupid, but I’ve been wondering for a long time how to use the Basic Profiles, because I cannot find them in my configuration. This is my actual situation:

  • I’ve installed the Basic Profiles Addon
  • I’m configuring a device discovered through HA Discovery.
  • The channel is a number channel that registers the number of times a button is pressed.
  • I want to link an openHAB switch (state ON/OFF) that I wan’t to toggle everytime the state of the number is updated.

It seems to me the Generic Toggle Switch Profile would be doing exactly what I want to achieve. But it isn’t shown in the list of profiles I can choose from (not even greyed out). Some other profiles from the Basic Profiles Addon (like Threshold) are shown, so it seems the package is installed correctly. Where is my misunderstanding?

As a ‘workaround’ i’ve created a custom transformation, that transforms any received data to the “TOGGLE” command, and that works fine. But I’m still wondering why I cannot select the Generic Toggle Switch profile.

Your HA discovery would have to include an event channel.

The Toggle Switch profile is specifically for event channels, that is channels that do not normally send a state to an item, but just cause an event to be triggered. There are a handful of profiles that allow event channels to be converted into state channels which would then permit the linking of an item to that channel. The UI is channel type aware so it is only showing you profiles that can be applied to the number type channel.

If there is some sort of buttonPressed event channel associated with your HA thing then you can use that with the Toggel Switch profile instead of the number channel.

1 Like

Thanks Justin. This was the hint I needed. I’ve changed my esphome device and now I can select the correct profile!