Homeassistant.update_entity stops updating

I was on 23.4.2 when one of my ‘command_line’ sensors stop responding. It appeared the newest python 3.11 (I have not updated anything since April) lost ‘request’ module. OK. I upgraded HA to 23.6.1… manually run ‘pip install request’ and the sensor got the data. BUT. I have a script to updated the sensor

bkk_update:
  sequence:
    - service: homeassistant.update_entity
      entity_id: sensor.bkk_time_table

the script does not update the sensor any longer… if I run the ‘homeassistant.update_entity’ service manually it also does not update the sensor.

The sensor is command_line python3 program which , if I run it in command line still works fine and returns fresh data…
What can be an issue to look at?

I see a new warning message saying ‘command_line to be removed in the ver 23.8’ . But that is not easy to me to move the logic from a simple script to an integration… i have tried a few years ago with no much success.

Known issue and fix is there, just awaiting deployment into a future release

I found an issue open on the git but could not find a solution. what is a work around for this issue until the permanent fix? BTW, the command_line sensor updates itself due to ‘scan_inteval’ parameter. but not by a call the update service ((

command_line entity cannot be updated manually · Issue #94270 · home-assistant/core (github.com)