Confused about datatypes

Hi all

I’m confused :frowning2:

I have something like this in the items file:
Number Window_EG_Bath "Gäste-WC [MAP(]" <contact> (EG_Bath, Windows) {channel="homematic:HM-Sec-RHS:ccu:KEQ1090000:1#STATE" }

Is this definition correct?
So I’ve got a number (which should be correct for the Homematic rotary handle) that represents the state. But if it is used in a sitemap, I want it to be displayed as text, hence the MAP and %s for string.

Apparently I got something wrong because:

  • The state is always “UNKNOWN” in the basic UI, I don’t see any errors in the logs
  • If I check Control in PaperUI, it displays NaN.
  • If I replace the %s with a %d, I get a Errror 500 in PaperUI when displaying Control. But this is actually what I copied over from my OH1 installation: Number … […%d]. Why does that not work anymore?

Well, I’m still confused, but this seems to work:
String Window_EG_Bath "Gäste-WC [MAP(]" <contact> (EG_Bath, Windows) {channel="homematic:HM-Sec-RHS:ccu:KEQ1090000:1#STATE" }

State is updated correctly in the UI and data gets logged in the database. In OH1, I had number values in the DB, now I have strings. I can live with that.
Would still appreciate some explanation though :slight_smile: