CAN bus ESPHome new project

I am looking at using the CAN ESPhome on a new project. This is some example code from the docs

canbus:
  - platform: ...
    on_frame:
    - can_id: 43 # the received can_id
      then:
        - if:
            condition:
              lambda: 'return (x.size() > 0) ? x[0] == 0x11 : false;'
            then:
              light.toggle: light1
    - can_id:      0b00000000000000000000001000000
      can_id_mask: 0b11111000000000011111111000000
      use_extended_id: true
      remote_transmission_request: false
      then:
        - lambda: |-
            auto pdo_id = can_id >> 14;
            switch (pdo_id)
            {
              case 117:
                ESP_LOGD("canbus", "exhaust_fan_duty");
                break;
              case 118:
                ESP_LOGD("canbus", "supply_fan_duty");
                break;
              case 119:
                ESP_LOGD("canbus", "supply_fan_flow");
                break;
              // to be continued...
            }

I would like to setup a different template sensors based on the value of the CAN ID. And then the state of these sensors would be derived from other parts of the same CAN frame.
(1) Can someone please help me in the correct direction to code this.
(2) Also the data in the CAN frame is binary. How can I translate this to text and float values.

Thanks in advance