You are attempting to access an attribute temperature on your sensor, which more than likely does not exist. The temperature you are watching in the graph is actually the state of the sensor itself. The solution would thus be to remove the line that says attribute: temperature.
Also, in general it is best to avoid device actions. They may be easy to understand in the visual editor but when looking at the code you have absolutely no idea what switch that action toggles. Much better to use a switch.turn_on action directly on your switch entity.