#Re-classify an Entity from switch to binary sensor

1 messages · Page 1 of 1 (latest)

neat mural
#

I'm setting up a Zooz Zen52 double relay modules that has a switch input function as well. You can configure the device to change the switch inputs to discreet binary sensor type inputs. In other words, instead of a voltage on one of these inputs controlling it's complimentary output, it will simply report on/off status.

I've set the Input Trigger parameter and excluded and re-included the device. The 2 new entities (if that's the correct term) do appear, but they are shown as "switch" types.

I would like to change the type of these 2 entities so they appear as read-only binary sensors rather than switches. I'm unclear of the correct way to do this. When I click the Settings for the control there is a Show as field but I'm not sure if this changes the underlying type of just the way it appears in the UI.
What's the correct thing to do here?

thin cargo
#

You will want to create a "Template Binary Sensor". This can done in the UI through the Helpers tab.

#

The state template should be something like {{ is_state('switch.your_device_switch', 'on' }}

#

and once you've created the helper, you can go to the original switch and edit it to turn off "Visible" so it won't appear in dashboards, etc.

neat mural
#

Good morning, thanks for the info. I've created the template and I'll get to my shop in a couple hours to test it. In the meantime I have a couple follow up questions on the screen shot here that I've attached:

  1. I can't figure out how to modify what shows up in this Controls card. As I understand it, these are Entities of the Zen52 Device. It seems like there should be a way to configure which Entities are displayed here, but I can't figure out.
  2. I'm not sure what these Scenes are, I suspect they are a function of the Zen52 (like it has on-board scenes). I don't want to use them, is there a way to disable/hide these from the Events card?

Glad to see my new template binary sensor displayed in that Sensors card 🙂

Oh, one more question: I wasn't sure what to name the sensor, I was trying to think of this is a generic sensor or specific to my single Zen52 device. I believe it is tightly coupled to my Zen52 because the template code makes reference to the entity ID for the switch, but I wanted to confirm this is the intended setup? Seems like I should rename it to have the device name in it's name so when I see it listed in automations, etc. I will know precisely what device it applies to. Do you agree? Like maybe "Dust Collector : Sensor 1" or "Dust Collector : Running (S1)". I think I know the answer, but curious in your take.

Thanks again for the help

#

Oh God! I just figured this out. LOL... just need to click on the items and you can hide them.

#

I struggle with the HA UI. Not complaining, but for whatever reason my brain just has a hard time using it and navigating. I use computers ALL DAY for work, but I'm a fumbling fool in the HA UI

vernal moth
#

There are some other examples of devices with the same issue.