mirror of
				https://github.com/CCOSTAN/Home-AssistantConfig.git
				synced 2025-10-31 02:37:25 +00:00 
			
		
		
		
	Last update for visual notifications : #307
This commit is contained in:
		| @@ -58,8 +58,9 @@ class MCServerSensor(Entity): | ||||
|         """Update device state.""" | ||||
|         status = self._mcserver.lookup(self._server).status() | ||||
|         query = self._mcserver.lookup(self._server).query() | ||||
|         self._state = str(status.players.online) | ||||
|         self._max = str(status.players.max) | ||||
|         self._state = status.players.online | ||||
|         #self._max = str(status.players.max) | ||||
|         self._max = status.players.max | ||||
|         self._users = query.players.names | ||||
|         self._motd = query.motd | ||||
|         self._version = query.software.version | ||||
|   | ||||
| @@ -32,24 +32,9 @@ automation: | ||||
|       - platform: state | ||||
|         entity_id: sensor.bear_stone | ||||
|  | ||||
|     condition: | ||||
|       - condition: template | ||||
|         value_template: > | ||||
|           {% if states.sensor.bear_stone.state|int == 0 %} | ||||
|             false | ||||
|           {% else %} | ||||
|             true | ||||
|           {% endif %} | ||||
|  | ||||
|     action: | ||||
|       - service_template: > | ||||
|             {% if states.sensor.bear_stone.state|int > 0 %} | ||||
|               light.turn_on | ||||
|             {% else %} | ||||
|               light.turn_off | ||||
|             {% endif %} | ||||
|         entity_id: | ||||
|           - light.justin_go | ||||
|       - service: light.turn_on | ||||
|         entity_id: light.justin_go | ||||
|         data_template: | ||||
|           color_name: > | ||||
|             {% if states.sensor.bear_stone.state|int == 1 %} | ||||
| @@ -67,3 +52,11 @@ automation: | ||||
|           - light.justin_go | ||||
|         data: | ||||
|           flash: long | ||||
|  | ||||
|       - service_template: > | ||||
|             {% if states.sensor.bear_stone.state|int > 0 %} | ||||
|               light.turn_on | ||||
|             {% else %} | ||||
|               light.turn_off | ||||
|             {% endif %} | ||||
|         entity_id: light.justin_go | ||||
|   | ||||
		Reference in New Issue
	
	Block a user