I am currently not on a computer, so I am not able to provide a hint on how to fix the condition, if you want to keep it that way, however my proposal would be to define a group of the device trackers. This group will indicate home, if at least one of those two devices is indicated as being home. In this automation, you can then simply check for the group entity.
Yes, just like the example shown in my previous post. Without the condition: statement, everything else you entered makes the automation invalid. In addition, if you use condition: or then it needs a minimum of two conditions to be of any value. You had one State Condition referencing two entities.
If what I suggested has resolved your original problem, please consider marking my post (above) with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This is a useful practice that helps users find answers to similar questions.
I see you have already marked another post as the Solution. However that one overlooked to mention your automation lacked a condition statement. As a result, other users reading it will assume it’s not necessary (because you chose it as the Solution). In addition, it’s not the lack of using a group that led to an invalid automation but the lack of a condition statement and at least two conditions for the OR.