Need to create a manual sensor

I am wanting to create a few sensors. I looked through the helpers, and, I first created a input.number but it shows as a box in the dashboard, not what I want. I just want to show the number with no input possible. The value comes from a program I have which is stuffing some monthly numbers into the sensors.

Is there no helper where you don’t need a device, don’t need an input box, and would simply show a value as a number or text in the dashboard? Or, do I have to configure them via yaml as a manual sensor?

Why can’t you just display the sensor value?

I have no sensor, I am asking HOW to create one that will just display the value, not a slider, not a input box, etc.

I had tried out the input.number sensor, I created it with the helper, but it shows as an input box on the dashboard, I don’t want an input box.

Then what the heck does this mean:

First of all you can display an input_number or number as a text without input box by setting it to a simple entity type, as stated in the docs:

Second, if you do not want the data to be entered by hand then it is key to select the entity helper type that is made for this purpose. It should get its value from somewhere, and there are helpers for almost any way. An input number gets the value from manual input, a template helper from a jinja2 template, a trigger based sensor from one or more triggers, a rest sensor from a rest call, a command line sensor from calling a command line utility, a file sensor from… you get the point. Unfortunately no one has created a stuffing sensor yet :wink:

2 Likes

It means this:

“I first created a input.number” actually several

Then I stuffed numbers into them

Then I put those onto a dashboard, where I saw an input box I did not like. Sorry if my explanation was not clear.

I don’t see entity type in the helpers so I presume then you are saying my option is to use configuration.yaml for this.

The question is, where do the numbers come from. That is what determines what helper is most suited.

But have you read the documentation I linked you to? You don’t have to if you want to display it in the dashboard without input box:

Well, your question is that, not mine. :grinning:

It’s just a non trivial (and slow) process that is not worth the lag time to have homeassistant to try and pull in from a complex external source. It’s trivial for me to stuff it into HA, code is already written and works. I get it now, there is no real helper for what I want, but I can do as you say and still use the input helper just use the entities card as you say. I had not had time to read it yet but see what you are saying now. Thanks a bunch. This is what I wanted!

I don’t mind an input box on other screens, it’s fine. Just the dashboard. Will work well.

There most definitely is a way to create a read only sensor for receiving the data from your working code, even if you can’t find it. It does not matter if the data is pushed or pulled. But we can’t help if you are mysterious about it.

1 Like

I appreciate your help. So confused, mysterious about what exactly? I am not willing to share WHAT the data is and I don’t see any way shape or form it is relevant except to lengthen any discussion and argue about what is best. I have an external complex system that would take far too long to explain and go down an endless rabbit hole trying to.

That external system has data, we’ll simplify the need in HA to a single number that takes quite some time to calculate and I choose to put it into HA via an API call whether that’s the best way or not, it’s what I want to do, I don’t want to store it somewhere and pull it in. I can already put said number there and it works fine, as do the calculations that come from a variety of sources. All I want to do is display it, that’s it. What is mysterious about that? What am I not explaining? An example of the data, 15626.288

So, I want the dashboard to display for example:
2024 15,626.288

Not in an input box. If I can do this via the GUI, great, don’t see how. If it takes configuration.yaml changes, great, I can do that. I can create a input.number_format via the helper. Or any other helper type, but I see no way to use those to specify the display format on the dashboard.

All I see is your entities card page and options. From what I can tell in the GUI, you cannot add simply-entity anywhere in the GUI. If that doesn’t explain what I am needing to do, please tell me exactly what information is missing. I apologize if I am somehow not able to communicate this.

EDIT: found the answer here for anyone else wanting to do the same thing:

The information that was missing is that you used the API to get the value into HA. You are storing it, in an input_number. You have to, otherwise there is nothing HA can co to display the value. But you could have used a trigger based template sensor instead.

The way you’d approach this without an input number is to create a webhook to receive the data. Calling the webhook would invoke a trigger. A trigger based template sensor would then be how you create a sensor to hold the value in HA. The docs show how to use the trigger for an automation, but the trigger can also be used to manipulate a sensor directly, without an automation.

The trigger described above can be used in any type of entity (in your case simply sensor) using a trigger based template sensor:

1 Like

That actually works really well. I like it better than input.number. Thanks! And it survives a restart too.

1 Like