Sonoff NSPanel by ITead - Smart Scene Wall Switch based on ESP32 and custom Nextion Touch Screen Panel Display (non-Pro variant)

Hi Claire, yes in Oz, and no - just using the standard met.no forecast sensor that is installed by default by HASS.

I’m having the same issue. The main weather shows fine but none of the forecast. Hope that API gets updated soon.

I have this resolved now, the idea - smile slowly - first ensure your sensor is working. Note I changed the template to update each minute as seen below, will return this to hour later. So I can see changes, I commented out # forecast, and set the state, temperature, temperature_unit to a string.

#NSPANEL MOD for weather
- trigger:
    - platform: time_pattern
      minutes: /1
  action:
    - service: weather.get_forecasts
      data:
        type: daily
      target:
        entity_id: weather.bom                                         # change to your weather entity
      response_variable: daily
  sensor:
    - name: Weather Forecast Daily
      unique_id: weather_forecast_daily
      state: "{{states('weather.bom')}}"                                         # change to your weather entity in this line
      attributes:
        temperature: "{{state_attr('weather.bom', 'temperature')}}"              # change to your weather entity
        temperature_unit: "{{state_attr('weather.bom', 'temperature_unit')}}"      # change to your weather entity
        forecast: "{{ daily['weather.bom'].forecast }}"                             # change to your weather entity

When I could see the Entity in Dev Tools >> States as ‘sensor.weather_forecast_daily’ I then enabled states and Reloaded All YAML, when this showed correctly I enabled temperature and so on.

If you go to his Github ([BUG] HA 2024.4 - cannot display forecast properly · Issue #1209 · joBr99/nspanel-lovelace-ui · GitHub) you will see what the sensor should look like.

Then add the sensor to the panel and the world should be beautiful.

key: ssKey
statusIcon1:
  entity: switch.study_nsp_switch1
  altFont: True
  icon:
    "on": mdi:menu-up-outline
    "off": "text:"
statusIcon2:
  entity: switch.study_nsp_switch2
  altFont: True
  icon:
    "on": mdi:menu-up-outline
    "off": "text:"
entities:
  - entity: weather.bom
  - entity: sensor.weather_forecast_daily
    type: 0
  - entity: sensor.weather_forecast_daily
    type: 1
  - entity: sensor.weather_forecast_daily
    type: 2
  - entity: sensor.weather_forecast_daily
    type: 3
  - entity: sensor.study_nsp_temperature
    icon: mdi:home-thermometer-outline
alternativeLayout: false
defaultCard: navigate.studyKey
theme: !include /homeassistant/appdaemon/apps/nsp_theme.yaml
1 Like

OK - got it working on my end … and totally my fault …

I forgot to do the required directory change and update of Appdaemon stuff …

Once I did the below … all returned to normal

follow instructions in here

Thanks for the confidence to keep troubleshooting. My issue was also my fault. I already had a template entry in my config file and had double entries. Somehow I missed the error in studio code the first time around. DOH.

Hi,

there is now available 12VDC backplate for NSPanel: Smartavan 12VDC backplate for Sonoff NSPanel

2 Likes

Hello,

anyone here can help me out please ?

when adding this line: app_dir: /homeassistant/appdaemon/apps
to the appdaemon.yaml my nspanel stops working.
yes the nspanel files are in this folder but it doesn’t work.
Getting all kind of weird appdaemon errors like:

2024-04-21 18:52:15.802634 WARNING nspanel-1: Unexpected error running initialize() for nspanel-1
2024-04-21 18:52:15.803151 WARNING nspanel-1: ------------------------------------------------------------
2024-04-21 18:52:15.808501 WARNING nspanel-1: Traceback (most recent call last):
File “/usr/lib/python3.11/site-packages/appdaemon/app_management.py”, line 162, in initialize_app
await utils.run_in_executor(self, init)
File “/usr/lib/python3.11/site-packages/appdaemon/utils.py”, line 304, in run_in_executor
response = future.result()
^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/homeassistant/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py”, line 18, in initialize
apis.ha_api = self.get_plugin_api(“HASS”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/appdaemon/utils.py”, line 231, in inner_sync_wrapper
f = run_coroutine_threadsafe(self, coro(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/appdaemon/utils.py”, line 313, in run_coroutine_threadsafe
result = future.result(self.AD.internal_function_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 401, in __get_result
raise self._exception
File “/usr/lib/python3.11/site-packages/appdaemon/adbase.py”, line 115, in get_plugin_api
return await self.AD.plugins.get_plugin_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/appdaemon/plugin_management.py”, line 404, in get_plugin_api
mod = import(module_name, globals(), locals(), [module_name], 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/homeassistant/appdaemon/apps/omnikdatalogger/omnik/plugin_localproxy/hassapi.py”, line 6, in
class HASSAPI(LocalProxyPlugin):
File “/homeassistant/appdaemon/apps/omnikdatalogger/omnik/plugin_localproxy/init.py”, line 7, in init
cls.register(cls) # Called when a plugin class is imported
^^^^^^^^^^^^^^^^^

Hello Everyone,

I am a self confessed noob at templates and I know I have the wrong syntax below.

But can someone help me with the right coding to display the sunrise time on the screen. The string works in the developer tools.

      - type: cardEntities
        title: Weather
        entities:
          - entity: sensor.sun_next_rising
            name: Sunrise
            value: {{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom ('%H:%M %p') }}