That’s not valid json. So it’ll never work. You’ll have to regex the value out. For some reason, that json has n.nn all over the place which will break value_json.
Unless you’re changing those values… which cash was at 0.00 2 seconds ago and now is n.nn. Are you editing this post and adjusting the values?
Anyways if it’s truely not valid json,
{{ value | regex_findall('\"cash\":([0-9.n]+)' | list | first | float(0) }}
I’ve done as you suggested. I’m getting the following error in my log:
Logger: homeassistant.components.notify
Source: components/notify/legacy.py:94
Integration: Notifications (documentation, issues)
First occurred: 12:34:34 (1 occurrences)
Last logged: 12:34:34
Error setting up platform command_line
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 94, in async_setup_platform
notify_service = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/command_line/notify.py", line 28, in get_service
command: str = notify_config[CONF_COMMAND]
~~~~~~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
How do I do this as a rest sensor? How do I get the Authorization and api key in?