Media players - Samsung TV, Sonos, Kodi

My automagically found my Sonos and put them in the entity_registry.yaml and created cards for them.
No problem there.

However, it also automagically found my Samsung TV and created a card for it but nowhere can I find any mention of it in any configuration file. Why is that?

Finally, Kodi.
I have Kodi in media_players.yaml:

- platform: kodi

HA creates a card for it but always says it is off. Is there anything else I need to do to make it recognise it’s true state?

HA does seem to lose track of what Kodi is doing every so often. I usually restart one or both (HA and Kodi) until things get back in sync. I haven’t taken notes while doing this, so I don’t yet know just which one gets things working again.

Thanks. I’ve only been using HA a couple of weeks and Kodi has not been restarted at all in that time so I’ll give that a try.