I would like to get the IP-address that an integration stores as config data in the file core.config_entries. I’d then like to use this value in a shell command that gets called by an automation. How would I do that?
Just for reference (the integration is the GoodWe integration, although there is nothing special about this case I think).
The entry in core.config_entries (I’d like the host value):
{
"version": 1,
"minor_version": 5,
"key": "core.config_entries",
"data": {
"entries": [
.
.
{"created_at":"2025-01-05T22:54:46.590383+00:00","data":{"host":"192.168.179.2","model_family":"ET"},"disabled_by":null,"discovery_keys":{},....},
.
.
]
}
}
The shell command (ping for now; will do something else later; I have it working with a hard coded IP address):
shell_command:
goodwe_ping: 'ping <insert-config-value-here>'
and how I call it in an automation (works):
triggers:
- trigger: time_pattern
seconds: /10
conditions: []
actions:
- data: {}
action: shell_command.goodwe_ping