Maybe go ahead and take out the battery for now. If you want to keep it in as a built in ups(one of the main benefits of using a laptop), one route is to run Home Assistant and put the laptop power cord on a smart plug. Figure out how to get the laptop battery % into Home Assistant and turn the plug on if the laptop goes below about 35% and back off when it goes above 85%. This is the strategy used by many people to prevent spicy pillows in wall mounted tablets, but same idea would apply here.
Maybe go ahead and take out the battery for now. If you want to keep it in as a built in ups(one of the main benefits of using a laptop), one route is to run Home Assistant and put the laptop power cord on a smart plug. Figure out how to get the laptop battery % into Home Assistant and turn the plug on if the laptop goes below about 35% and back off when it goes above 85%. This is the strategy used by many people to prevent spicy pillows in wall mounted tablets, but same idea would apply here.