Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service not found #4

Closed
foXaCe opened this issue May 8, 2020 · 10 comments
Closed

service not found #4

foXaCe opened this issue May 8, 2020 · 10 comments

Comments

@foXaCe
Copy link

foXaCe commented May 8, 2020

je n'arrive pas a faire démarrer la pompe
service not found

je ne comprends pas ce qu'il faut mettre a la place de cette entité
switch_entity_id: input_boolean.fake_pump_switch

peut etre que mon probleme viens de la .

@oncleben31
Copy link
Owner

Justement il faut remplacer input_boolean.fake_pump_switch par l'entité qui va piloter la mise sous tension de ta pompe. Très probablement un switch.xxxxxxxxxx

@foXaCe
Copy link
Author

foXaCe commented May 8, 2020

ok. il y a un truc que je dois pas bien faire.
mon entity s'appelle
switch.pompe_piscine

configuration.yaml

input_select:
pool_pump_mode:
name: Pool Pump mode
options:
- 'Auto'
- 'On'
- 'Off'
initial: 'Auto'
icon: mdi:water-pump

input_boolean:
swimming_season:
name: Swimming Season
icon: mdi:swim

input_number:
run_pool_pump_hours_swimming_season:
name: Run Pool Pump in Swimming Season
min: 1
max: 15
step: 1
run_pool_pump_hours_off_season:
name: Run Pool Pump in Off Season
min: 1
max: 6
step: 1

pool_pump:
switch_entity_id: switch.pompe_piscine
pool_pump_mode_entity_id: input_select.pool_pump_mode
swimming_season_entity_id: input_boolean.swimming_season
run_pool_pump_hours_swimming_season_entity_id: input_number.run_pool_pump_hours_swimming_season
run_pool_pump_hours_off_season_entity_id: input_number.run_pool_pump_hours_off_season

@foXaCe
Copy link
Author

foXaCe commented May 8, 2020

automation.yaml

alias: 'Pool Pump On'
trigger:

  • platform: state
    entity_id: input_select.pool_pump_mode
    to: 'On'
    action:
    service: homeassistant.turn_on
    entity_id: switch.pompe_piscine
    alias: 'Pool Pump Off'
    trigger:
    • platform: state
      entity_id: input_select.pool_pump_mode
      to: 'Off'
      action:
      service: homeassistant.turn_off
      entity_id: switch.pompe_piscine
      alias: 'Check Pool Pump Periodically'
      trigger:
    • platform: time_pattern
      minutes: '/5'
      seconds: 00
      condition:
      condition: and
      conditions:
      • condition: sun
        after: sunrise
        after_offset: '-1:00:00'
      • condition: sun
        before: sunset
        before_offset: '1:30:00'
        action:
        service: pool_pump.check
        alias: 'Check Pool Pump on Event'
        trigger:
    • platform: homeassistant
      event: start
    • platform: state
      entity_id:
      • input_select.pool_pump_mode
      • input_boolean.swimming_season
      • input_number.run_pool_pump_hours_swimming_season
      • input_number.run_pool_pump_hours_off_season
      • binary_sensor.pool_water_level_critical
        action:
        service: pool_pump.check

@oncleben31
Copy link
Owner

Peux tu détailler les symptomes. Peux tu ajouter ca dans ton configuration.yaml

logger:
  default: error
  logs:
    custom_components.pool_pump: debug

Reboot et regarde les logs.

@foXaCe
Copy link
Author

foXaCe commented May 9, 2020

peut etre ca pourra te parler. j'ai essayer de filtrer le log

Pool Pump Manager
Version: 0.0.1
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/oncleben31/ha-pool_pump/issues

2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Pool pump mode: Auto
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Calculating daylight for today: 2020-05-09 01:23:32.917093+02:00
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Total daylight today: 14.4 hours
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Breaks maximum is 504.6 for offset 75 and break 60
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Manager initialised: <PoolPumpManager(runs=[<Run(start=2020-05-09 07:50:00+02:00, stop=2020-05-09 10:50:00+02:00, duration=180.0)>, <Run(start=2020-05-09 11:50:00+02:00, stop=2020-05-09 14:50:00+02:00, duration=180.0)>])>
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Next run: <Run(start=2020-05-09 07:50:00+02:00, stop=2020-05-09 10:50:00+02:00, duration=180.0)>
2020-05-09 08:23:32 DEBUG (MainThread) [custom_components.pool_pump] Pool pump should be on now: <Run(start=2020-05-09 07:50:00+02:00, stop=2020-05-09 10:50:00+02:00, duration=180.0)>
2020-05-09 08:23:32 INFO (MainThread) [custom_components.pool_pump] Switching pool pump from 'off' to 'on'

2020-05-09 08:49:03 DEBUG (MainThread) [custom_components.pool_pump] Pool pump mode: Auto
2020-05-09 08:49:03 DEBUG (MainThread) [custom_components.pool_pump] Calculating daylight for today: 2020-05-09 01:49:03.639434+02:00
2020-05-09 08:49:03 DEBUG (MainThread) [custom_components.pool_pump] Total daylight today: 14.4 hours
2020-05-09 08:49:03 ERROR (MainThread) [homeassistant.components.automation] Check Pool Pump on Event: Error executing script. Unexpected error for call_service at pos 1: could not convert string to float: 'unavailable'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
self, f"async{cv.determine_script_action(self._action)}_step"
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 623, in _async_call_service_step
*self._prep_call_service_step(), blocking=True, context=self._context
File "/usr/src/homeassistant/homeassistant/core.py", line 1247, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1282, in _execute_service
await handler.func(service_call)
File "/config/custom_components/pool_pump/init.py", line 100, in check
manager = PoolPumpManager(hass, now)
File "/config/custom_components/pool_pump/init.py", line 140, in init
self._first_run_offset_after_sunrise, self._durations = self._build_parameters()
File "/config/custom_components/pool_pump/init.py", line 162, in _build_parameters
ATTR_RUN_PUMP_IN_SWIMMING_SEASON_ENTITY_ID
ValueError: could not convert string to float: 'unavailable'
2020-05-09 08:49:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):`

@oncleben31
Copy link
Owner

Peux tu éditer ton dernier commentaire et utiliser la syntaxe adéquat pour partager du code et des logs. https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks

Pour le moment c'est pas très lisible

@foXaCe
Copy link
Author

foXaCe commented May 9, 2020

ok j'ai reussi a faire marcher.

@foXaCe
Copy link
Author

foXaCe commented May 9, 2020

Voici mon automations

`- id: '1589011338617'
alias: Pool Pump On
description: ''
trigger:

  • entity_id: input_select.pool_pump_mode
    platform: state
    to: 'On'
    condition: []
    action:
  • data: {}
    entity_id: switch.pompe_piscine
    service: homeassistant.turn_on
  • id: '1589011456667'
    alias: Pool Pump Off
    description: ''
    trigger:
    • entity_id: input_select.pool_pump_mode
      platform: state
      to: 'Off'
      condition: []
      action:
    • data: {}
      entity_id: switch.pompe_piscine
      service: homeassistant.turn_off
  • id: '1589012007096'
    alias: Check Pool Pump Periodically
    description: ''
    trigger:
    • minutes: /5
      platform: time_pattern
      seconds: '00'
      condition:
    • condition: and
      conditions:
      • after: sunrise
        after_offset: '-1:00:00'
        before: sunset
        before_offset: '1:30:00'
        condition: sun
        action:
    • data: {}
      service: pool_pump.check
  • id: '1589012278069'
    alias: Check Pool Pump on Event
    description: ''
    trigger:
    • event: start
      platform: homeassistant
    • entity_id: input_select.pool_pump_mode
      platform: state
      to: Auto
      condition: []
      action:
    • data: {}
      service: pool_pump.check
      `

@oncleben31
Copy link
Owner

Content pour toi. Peux tu expliquer ceux que tu as corrigé. Cela pourra servir à d'autre peut être ?
Pense à étudier les basiques de la contribution sur les projets open sources pour faciliter les communcation.

@foXaCe
Copy link
Author

foXaCe commented May 9, 2020

j'ai rien fait de spécial. j'ai repris chaque automations 1 a 1 depuis le début.
évidemment si quelqu'un a besoin d'aide, pas de problème pour moi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants