Template and entity_id beginning with a number

I run in another Probelm.
I change the icon when a Sensor Node comes online.
But this doesn’t work with this:

platform: template
sensors:
  template_433_mhz_hub_status :
    ##friendly_name: "XXX"
    value_template: "{{ states.sensor['433_mhz_hub_status'].state }}"
    icon_template: >-
      {% if is_state('sensor["433_mhz_hub_status"]', 'online') %}
        mdi:wifi
      {% else %}
        mdi:wifi-off
      {% endif %}

But the same Code works with this template:

platform: template
sensors:
  template_kitchen_node_1_status:
    ##friendly_name: "XXX"
    value_template: "{{ states.sensor.kitchen_node_1_status.state }}"
    icon_template: >-
      {% if is_state('sensor.kitchen_node_1_status', 'online') %}
        mdi:wifi
      {% else %}
        mdi:wifi-off
      {% endif %}

What could be the reason for this?