Super minor topic: Please have a look at the screenshot. You will notice one of my “battery low switches” is shown as a switch instead of the transformed state. I have absolutely no idea why this is the case. Any ideas?
NULL=Undefiniert
ON=Batterie schwach
OFF=Batterie in Ordnung
UNDEFINED=Undefiniert
-=Undefiniert
UNDEF=Undefiniert
The only difference I sense, the espressometer battery state isn’t set via a channel but by my own rule (but it works as expected, it’s just a display issue):
rule "Sonstiges: Siebträger Batterieladung niedrig" do
changed Espressometer_Batterie_Batterieladung
run do
charge = Espressometer_Batterie_Batterieladung.state.to_i
Espressometer_Batterie_Batteriestatus.ensure << ((charge <= 20) ? ON : OFF)
end
end
What are we looking at, an automatically created card (e.g. Properties) or a widget you’ve added to a page yourself?
With the text on the bottom of each element it looks like a tiny part of a Locations card?
If this is indeed part of the Overview tabs, the widgets chosen to display an Item can be influenced by information pushed by the binding. Since this not working Item isn’t linked to anything it doesn’t get any additional information.
You probably just need to configure the Item’s stateDescription metadata to indicate that the Item is read only. I’m willing to bet that’s the difference here. But if you create a stateDescription metadata, you might need to move the stuff between the (e.g. MAP(batteriezustand.map):%s) to the pattern property of that metadata.
If that doesn’t work, you can always override the widget used to display the Item by creating “Default List Item Widget” metadata where you configure the UI widget OH should use in the Overview cards instead of what ever default widget it determines should be used.
But the thing is you do have influence over the widget.
You can influence it through the semantic tags (e.g. “Measurement” will always choose a read only widget over one that can be used to command the Item).
You can influence it through the stateDescription (as you see here).
And you can completely define your own widget to use instead of what OH chooses through the Default List Item Widget metadata. The widget you define there will be used instead.
For example, I’ve merged all my smart humidifier Items into one entry in the cards on the Overview page by setting the default list item widget metadata on one of them and setting the visibility of the rest to false.