New Generall Rest Api integration

My scripting skills have hit a wall in Home Assistant automation
I want to create entities dynamically With out knowing the “static” entity name at home assistant.

I need to create an integration but my python skills are limited. I think i found a workaround but the following would be great.

Create a general rest api integration where you can hook up a hostname and token. and based on the rest properties (multiple) entities are managed.

you can do a lot with the config but I want to bring my network management to home asssistant where i can manage what device uses what kind of internet connection. (direct,pihole,vpn.no internet)

and a white list of ip’s able to connect to my local network.

Sorry to say, but your request is far too vague to make any sense.

Please describe in details what you want to achieve, why you cannot do it in the current situation, and the feature that would address the need.

Oh sorry I thought i still had it in edit when i went to bed.

I have a system that sends. Ips and the state to HA with rest calls.
those are read only so the best solution to create select entities that can be selected into a new state is unusable.

Only way to create dynamically editable entities from home assistant is by writing a integration.
I am a linux power user but not a programmer. can do very neat things. improvements at my asterisk phone home assistant end point. - YouTube
But programming a integration is not something i can do easily.
I don’t know what kind of level of python developer you need to be to create an integration but i’m not it.

creating a general integration that connects to a rest server that has one endpoint with all the information to create the entities. (and perhaps something smart to get updates of one entity)
Will cover this gap in home assistant.

What is read-only? Entities certainly aren’t. You can even create entities on-the-fly, w/o any integration

❯ curl -H "Authorization: Bearer foobar" "http://127.0.0.1:8123/api/states/sensor.test_new_1" -d '{ "state": 20, "attributes": {"min": 5, "max": 80, "mode": "slider" }}'
{"entity_id":"sensor.test_new_1","state":"20","attributes":{"min":5,"max":80,"mode":"slider"},"last_changed":"2023-08-06T08:04:28.011960+00:00","last_updated":"2023-08-06T08:04:28.011960+00:00","context":{"id":"01H74Y0KQB36R1P6SM0VQ5XCRS","parent_id":null,"user_id":"769c507eadfd4c6995e1afaef843e899"}}

scroll more to the right. there should be a read only notification

create an entity with rest.
scroll more to the right. there should be a read only notification

test to edit it from within home assistant cant be done.

So? It relates to

but it isn’t actually read-only

❯ curl -H "Authorization: Bearer foobar" "http://127.0.0.1:7123/api/states/sensor.test_new_1" -d '{ "state": 99, "attributes": {"min": 5, "max": 80, "mode": "slider" }}'
{"entity_id":"sensor.test_new_1","state":"99","attributes":{"min":5,"max":80,"mode":"slider"},"last_changed":"2023-08-06T08:35:57.259316+00:00","last_updated":"2023-08-06T08:35:57.259316+00:00","context":{"id":"01H74ZT8PBWDK03FE928QGE83D","parent_id":null,"user_id":"769c507eadfd4c6995e1afaef843e899"}}

Your not editing it from within home assistant but keep rewritiing it with rest calls that works. never said it did.

create a select option. with rest. select a new option from the gui. see the attributes. old state is there.

Ok, what about you doing the curls and screenshot so that we understand what’s not working for you? :wink:
That’s what I meant in my first answer…

root@doorman:/opt/ip-rule-switcher# ./scan_arp.php 


IP Scanner Daemon started. Press CTRL+C to stop.
Updating hostname for IP 192.168.5.218 with hostname CPX-LPT-71.lan.
Setting iptables rules for IP 192.168.5.218
iptables -t nat -A PREROUTING -s 192.168.5.218 -d 192.168.5.1 -p udp --dport 53 -j DNAT --to-destination 192.168.5.2
iptables -t nat -L PREROUTING --line-numbers -n| grep " 192.168.5.218 " | grep "udp dpt:53" | grep "192.168.5.1" | grep -v "192.168.5.2" 
Updating last seen timestamp for IP 192.168.5.218.
Updating hostname for IP 192.168.5.226 with hostname Torch.lan.
Setting iptables rules for IP 192.168.5.226
iptables -t nat -A PREROUTING -s 192.168.5.226 -d 192.168.5.1 -p udp --dport 53 -j DNAT --to-destination 192.168.122.2
iptables -t nat -L PREROUTING --line-numbers -n| grep " 192.168.5.226 " | grep "udp dpt:53" | grep "192.168.5.1" | grep -v "192.168.122.2" 
Updating last seen timestamp for IP 192.168.5.226.
Updating hostname for IP 192.168.5.230 with hostname Blue-mage.lan.
Setting iptables rules for IP 192.168.5.230
iptables -t nat -A PREROUTING -s 192.168.5.230 -d 192.168.5.1 -p udp --dport 53 -j DNAT --to-destination 192.168.122.2
iptables -t nat -L PREROUTING --line-numbers -n| grep " 192.168.5.230 " | grep "udp dpt:53" | grep "192.168.5.1" | grep -v "192.168.122.2" 
Updating last seen timestamp for IP 192.168.5.230.
Updating hostname for IP 192.168.5.250 with hostname rtthread.lan.
Setting iptables rules for IP 192.168.5.250
iptables -t nat -A PREROUTING -s 192.168.5.250 -d 192.168.5.1 -p udp --dport 53 -j DNAT --to-destination 192.168.5.1
iptables -t nat -L PREROUTING --line-numbers -n| grep " 192.168.5.250 " | grep "udp dpt:53" | grep "192.168.5.1" | grep -v "192.168.5.1" 
Updating last seen timestamp for IP 192.168.5.250.
Updating hostname for IP 192.168.5.203 with hostname vision.lan.
Setting iptables rules for IP 192.168.5.203
iptables -t nat -A PREROUTING -s 192.168.5.203 -d 192.168.5.1 -p udp --dport 53 -j DNAT --to-destination 192.168.122.2
iptables -t nat -L PREROUTING --line-numbers -n| grep " 192.168.5.203 " | grep "udp dpt:53" | grep "192.168.5.1" | grep -v "192.168.122.2" 
Updating last seen timestamp for IP 192.168.5.203.
Setting IP 192.168.5.130 offline in the database.
Device tracker entity created/updated successfully.
Device tracker entity created/updated successfully.
Device tracker entity created/updated successfully.
Device tracker entity created/updated successfully.
Device tracker entity created/updated successfully.
Device tracker entity created/updated successfully.
Scanning for IP changes -

Ok, now we got somewhere.

You might want to rephrase you FR to something like:
“Ability to create working helpers via the REST api”

and include the log message:

2023-08-06 10:51:07.255 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities input_select.test_new_1 are missing or not currently available

Its in the documentation.

You cant create any writable entity with rest.