MegaD: How to change entity (-ies) domain?

Hello everybody, I’m newby for HA, sorry.
And I read the similar topic Change entity domain? but…

Ok, when I installed HA and some integrations at first of all I found that not all domains defined corrrectly.

I have MegaDevice that control some devices (by wire connections). It has inputs (I2C, 1-wire etc.; but I’m about outputs now). I have 3 electrical batteries (air heaters) connected to MegaD for ports 10, 11, 12… All of them were detected as a light domain. And now I have (for example):

type: turn_on
device_id: ac3f8126.............cad90f620eb4a
entity_id: **light**.mega_10
**domain: light**

I’d prefer to have correct domain for thermo devices like “heater”, “batery” etc.

Sure, different ports could ave different devices. mega_7 & mega_8 are lights, this is correct!

To opposite that I have SONOFF 4CHPROR3 4-gang Wi-Fi that control my 4 lamps; but it defined to domain “switch” :frowning: Sure, this is a switch also - but it not in standard automation ‘Light:turn_on’

How to fix it, change domain for entities?
Thank you in advance!
P.S. More detailed answer if you can. I’m newby I told :slight_smile:

Domain is something about how home assistant is handling commands for the entities. I believe you are more interested in device classes.

As an example, motion sensors are part of binary sensor (true/false) domain but they can be configured as different device classes as motion, presence, alarm, power, gas etc. And depending on device class UI will be a bit different.

1 Like