MQTT commands in Telegram

Hi There,

Im trying to set up the call back feature in Telegram together with ‘/command’ and ‘text’ .yaml. I have some MQTT lights and switches that I want to be able to turn off from the Telgram keyboard that pops up when I quiry the status of the location where the lights and switches are. If there is a ny device turned on then Telegram pops up the keyboard with the buttons to turn off the item.

This is what I have been trying so far, but it does not work for these mqtt commands so I must have the syntax wrong. I searched by couldnt find any other posts for mqqt commands in Telegram so here I am. The service: light.turn_off wit hthe device_id: - light.porch_light and the rest dont work, I suspect because they are actually mqtt activated lights so need an mqtt command. I tried with the service: mqtt and the following command but again that doesnt work.

          - conditions: "{{ trigger.event.data.command == '/ustou_lights_off' }}"
            sequence:
              - service: telegram_bot.answer_callback_query
                data:
                  message: "Turning off lights..."
                  callback_query_id: '{{ trigger.event.data.id }}'       
              - service: light.turn_off
                entity_id: 
                  - light.porch_light
                  - light.entrance_hall_light
                  - light.lounge_table_lamp_lh
                  - light.lounge_table_lamp_rh
                  - light.telephone_table_lamp
                  - light.dining_floor_light
              - service: mqtt
                name: "Dining Floor Light"
                command_topic: "cmnd/floorlamp/POWER" 
                command: "OFF" 
              - delay: 
                  seconds: 3                
              - service: telegram_bot.edit_message
                data:
                  message_id: "{{ trigger.event.data.message.message_id }}"
                  chat_id: "{{ trigger.event.data.chat_id }}"      
                  title: "Everything should be OFF now, please check below......"

Any assistance would be great thank you all in advance.

Chris