EDIT: Cancel that. The below does not work as the JSON does not update for some reason.
I found a workaround here. Thanks @atomicpapa
mqtt:
sensor:
- name: FKB Tablet JSON
unique_id: fkb_tablet_json
state_topic: "fully/deviceInfo/galaxytab10"
json_attributes_topic: "fully/deviceInfo/galaxytab10"
Then strip the attributes from the new sensor.
sensor:
- platform: template
sensors:
tablet_charging_status:
friendly_name: Tablet Charging Status
value_template: >-
{% if is_state_attr('sensor.fkb_tablet_json', 'isPlugged', true) %} Yes {% else %} No {% endif %}
icon_template: >-
{% if is_state_attr('sensor.fkb_tablet_json', 'isPlugged', true) %} mdi:power-plug {% else %} mdi:power-plug-off {% endif %}
There may be a way to use json_attributes_template:
to strip the actual charging state directly but I can’t figure that out.